Difference makes the DIFFERENCE
import seaborn as sns
import numpy as np
import pandas as pd
snsPlanets = sns.load_dataset('planets')
snsPlanets
snsPlanets.describe()
snsPlanets.describe
snsPlanetsT = snsPlanets.T
snsPlanetsT
snsPlanets.values
snsPlanets.index
snsPlanets.head()
snsPlanets.info()
snsPlanets.describe()
dfPlanets = snsPlanets
df2Planets = snsPlanets
for r in snsPlanets.index:
for c in snsPlanets.columns:
if pd.isnull(snsPlanets.loc[r, c]):
snsPlanets.drop(r, inplace = True)
break
snsPlanets.describe()
for i, r in snsPlanets.iterrows():
print(i, r)
break
dfPlanets.info()
for i, r in dfPlanets.iterrows():
print(pd.isnull(r))
break # to stop after first execution
for i, r in dfPlanets.iterrows():
print(pd.isnull(r).any())
break # to stop after first iteration
for i, r in dfPlanets.iterrows():
if pd.isnull(r).any():
dfPlanets.drop(i, inplace = True)
dfPlanets.describe()
dfPlanets.info()
df2Planets.dropna(inplace = True)
df2Planets.info()
!pip install nbconvert