Last active
November 12, 2024 12:51
-
-
Save mertdurukan/1fe9cee20a42ef25ee2301fe6f0bbb89 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import numpy as np | |
# Veri çerçevesi oluşturma | |
data = pd.DataFrame({ | |
'isim': ['Ali', 'Ayşe', 'Fatma', 'Mehmet'], | |
'yaş': [25, np.nan, 30, np.nan] | |
}) | |
# Eksik değerleri "yaş" sütununun ortalaması ile doldurma | |
data['yaş'].fillna(data['yaş'].mean(), inplace=True) | |
print(data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment