Inspecting DataFrames
ms.head() #this will give the first 5 rows by default. You can add any number in the () to get that number of rows






Last updated
Was this helpful?
ms.head() #this will give the first 5 rows by default. You can add any number in the () to get that number of rows






Last updated
Was this helpful?
Was this helpful?
ms.tail(10) #and the last 10 rowsms.describe() #this is a quick way to get summary statistics on a per-column basis#What do you notice about the number of columns returned by describe vs that in the entire dataframe...
ms.shapems.columnsmissing = []
des_cols = ms.describe().columns
for col in ms.columns:
if col in des_cols:
print('found: '+ col)
else:
missing.append(col)missingpd.set_option('display.max_rows', 50) #This will set the number of rows you can "see" in the jupyter notebook when you inspect a dataframe
pd.set_option('display.max_columns', 200) #This will set the number of columns you can "see" in the jupyter notebook when you inspect a dataframems.describe() #notice the difference in the number of columns you can see