#30. Pandas: Missing values - 3: fillna(), dropna() in Python -16 | Tutorial

preview_player
Показать описание
The video discusses the methods fillna() and dropna() in Python.

Timeline & Data
(Python 3.7)

00:00 - Welcome
00:07 - Outline of video
00:29 - Open Jupyter notebook
00:35 - Data
00:51 - .fillna(): with zero or any number
01:44 - .fillna(): with string
02:45 - method=‘pad’
04:12 - Using ‘pad’ with limit=1
05:12 - method=‘ffill’
06:06 - method=‘bfill’
07:25 - Using ‘bfill’ with limit=1
08:13 - method=‘backfill’
08:42 - Create new DataFrame
10:23 - Insert NaN values in DataFrame
10:43 - Using .mean() to fill NaN
11:38 - Replace NaN’s with .mean() in subset of columns
13:14 - .notna() with .where()
14:27 - Drop columns or rows in a DataFrame
14:50 - Drop rows with NaN
15:10 - Drop columns with NaN
15:26 - Ending notes

###############
# Data
###############
df = pd.DataFrame({
},
index=pd.Series([11,13,15,17,20])
)
df2

dfa = pd.DataFrame({
})
dfb['z'] = dfa['y']
dfb

###############
Рекомендации по теме
Комментарии
Автор

how can tackle this issue: ValueError: NaTType does not support timetuple

deepakshukla