filmov
tv
#31. Pandas: Missing values - 4: Interpolate - 17 | Tutorial
Показать описание
The video discusses methods to interpolate missing values in a dataset in Python.
Timeline & Data
(Python 3.7)
00:00 - Welcome
00:09 - Outline of video
01:17 - Open Jupyter notebook
01:30 - Data with discussion
03:16 - Method: time
04:56 - Plot-1: time
09:19 - Method: value : for floats in data
10:46 - Plot-2: original values
11:59 - Plot-2: Method: linear
13:22 - Plot-2: Method: quadratic
14:40 - Plot-2: Method: cubic
15:20 - Plot-2: Method: polynomial
16:09 - Plot-2: Method: spline
17:00 - Plot-2: Method: piecewise_polynomial
17:40 - Plot-2: Method: krogh
18:55 - Plot-2: Method: barycentric
19:50 - Plot-2: Method: chip
20:44 - Plot-2: Method: anima
22:40 - Plot-3: Methods: (all above)
27:00 - Plot-4: Methods: (all above)
30:41 - Plot-4: Method: linear with original, missing
32:00 - Plot-4: Method: quadratic
32:30 - Plot-4: Method: cubic
32:58 - Plot-4: Method: polynomial
33:05 - Plot-4: Method: spline
33:52 - Plot-4: Method: piecewise_polynomial
34:04 - Plot-4: Method: krogh
34:35 - Plot-4: Method: barycentric
35:09 - Plot-4: Method: chip
35:40 - Plot-4: Method: chip
36:03 - Plot-4: Method: (all above)
36:19 - Key things to remember
37:20 - Interpolate: default
38:30 - Interpolate: limit
39:25 - Interpolate: limit_direction: backward
41:00 - Interpolate: limit_direction: both
41:32 - Interpolate: limit_direction: forward
42:00 - Interpolate: limit_area: inside
43:33 - Interpolate: limit_area: outside
44:28 - Ending notes
###############
# Data
###############
dfmn = pd.DataFrame({
'm':m,
'n':n
})
dfx = pd.DataFrame({
'x_orig':x,
'y_orig':y,
'x':x,
'y':y,
})
dt = ['20200101','20200102','20200103','20200104','20200105','20200106','20200107','20200108','20200109',"20200110"]
dft = pd.DataFrame({
'dt':dt,
'x_orig':x_orig,
})
#
# Create NaN's
dft['x']=dft['x_orig']
dft['y'] = dft['y_orig']
# Set column as index
###############
Timeline & Data
(Python 3.7)
00:00 - Welcome
00:09 - Outline of video
01:17 - Open Jupyter notebook
01:30 - Data with discussion
03:16 - Method: time
04:56 - Plot-1: time
09:19 - Method: value : for floats in data
10:46 - Plot-2: original values
11:59 - Plot-2: Method: linear
13:22 - Plot-2: Method: quadratic
14:40 - Plot-2: Method: cubic
15:20 - Plot-2: Method: polynomial
16:09 - Plot-2: Method: spline
17:00 - Plot-2: Method: piecewise_polynomial
17:40 - Plot-2: Method: krogh
18:55 - Plot-2: Method: barycentric
19:50 - Plot-2: Method: chip
20:44 - Plot-2: Method: anima
22:40 - Plot-3: Methods: (all above)
27:00 - Plot-4: Methods: (all above)
30:41 - Plot-4: Method: linear with original, missing
32:00 - Plot-4: Method: quadratic
32:30 - Plot-4: Method: cubic
32:58 - Plot-4: Method: polynomial
33:05 - Plot-4: Method: spline
33:52 - Plot-4: Method: piecewise_polynomial
34:04 - Plot-4: Method: krogh
34:35 - Plot-4: Method: barycentric
35:09 - Plot-4: Method: chip
35:40 - Plot-4: Method: chip
36:03 - Plot-4: Method: (all above)
36:19 - Key things to remember
37:20 - Interpolate: default
38:30 - Interpolate: limit
39:25 - Interpolate: limit_direction: backward
41:00 - Interpolate: limit_direction: both
41:32 - Interpolate: limit_direction: forward
42:00 - Interpolate: limit_area: inside
43:33 - Interpolate: limit_area: outside
44:28 - Ending notes
###############
# Data
###############
dfmn = pd.DataFrame({
'm':m,
'n':n
})
dfx = pd.DataFrame({
'x_orig':x,
'y_orig':y,
'x':x,
'y':y,
})
dt = ['20200101','20200102','20200103','20200104','20200105','20200106','20200107','20200108','20200109',"20200110"]
dft = pd.DataFrame({
'dt':dt,
'x_orig':x_orig,
})
#
# Create NaN's
dft['x']=dft['x_orig']
dft['y'] = dft['y_orig']
# Set column as index
###############
Комментарии