Pandas | Basics | Priority Flashcards
How to convert text into 0/1 for machine learning.
Machine Learning with PyTorch and Scikit-Learn Chapter 9 p273
df[‘Central Air’] = df[‘Central Air’].map({‘N’: 0, ‘Y’: 1})
Machine Learning with PyTorch and Scikit-Learn Chapter 9 p273
Check whether any of the data frame columns contain missing values.
Machine Learning with PyTorch and Scikit-Learn Chapter 9 p273
df.isnull().sum()
Machine Learning with PyTorch and Scikit-Learn Chapter 9 p273
Remove rows with missing values.
Machine Learning with PyTorch and Scikit-Learn Chapter 9 p273
df = df.dropna(axis=0)
Machine Learning with PyTorch and Scikit-Learn Chapter 9 p273
Pandas series idioms for histogram, boxplot, kernel density plot, line plot?
Effective Pandas 14. Plotting with a Series
df[‘series_name’].plot.hist()/box()/kde()/line()
Pandas function to convert a multiindex to columns.
Effective Pandas 14. Plotting with a Series
unstack()
Pandas idiom to get percentages from a series.
Effective Pandas 14. Plotting with a Series
“(season2017
.resample(‘M’)
.sum()
.div(season2017.sum())
.mul(100))”