Created
September 18, 2020 21:18
-
-
Save rodrigols89/98697544f40ca2ceb1d32c4d140b059d 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 | |
pd.set_option('display.max_columns', 42) | |
data = pd.read_csv('../datasets/2015-building-energy-benchmarking.csv') | |
# Exibe a média de cada coluna. | |
print((data.isnull().sum() / len(data['OSEBuildingID'])) * 100, '\n') | |
data['ENERGYSTARScore'] = data['ENERGYSTARScore'].fillna(data['ENERGYSTARScore'].median()) | |
# Exibe a média de cada coluna depois de substituir os NaN da coluna - ENERGYSTARScore | |
print((data.isnull().sum() / len(data['OSEBuildingID'])) * 100) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment