pandas: powerful Python data analysis toolkit - 1.4.4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 605 2.10.6 Filling missing values: fillna . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 606 2.10.7 Filling with a PandasObject 3 D -1.135632 -0.173215 4 D -1.135632 0.119209 Forward fill from previous rows In [4]: outer_join.fillna(method="ffill") Out[4]: key value_x value_y 0 A 0.469112 NaN 1 B -0.282863 1.212112 2 C -1.509059 044236 Replace missing values with a specified value Using the mean: In [1]: outer_join["value_x"].fillna(outer_join["value_x"].mean()) Out[1]: 0 0.469112 1 -0.282863 2 -1.509059 3 -1.135632 4 -1.1356320 码力 | 3743 页 | 15.26 MB | 2 年前3
pandas: powerful Python data analysis toolkit - 0.13.12 1.500000 3 4.000000 dtype: float64 • Infer and downcast dtype if downcast=’infer’ is passed to fillna/ffill/bfill (GH4604) • __nonzero__ for all NDFrame objects, will now raise a ValueError, this reverts timedelta64[ns] Fillna is now supported for timedeltas In [82]: td.fillna(0) Out[82]: 0 31 days, 00:00:00 1 31 days, 00:00:00 2 31 days, 00:05:03 3 0 days, 00:00:00 dtype: timedelta64[ns] In [83]: td.fillna(timedelta(days=1 appropriate. See the docs. Interpolate now also accepts a limit keyword argument. This works similar to fillna‘s limit: In [102]: ser = Series([1, 3, np.nan, np.nan, np.nan, 11]) 26 Chapter 1. What’s New pandas:0 码力 | 1219 页 | 4.81 MB | 2 年前3
pandas: powerful Python data analysis toolkit - 0.21.1. . . . . . . . . . . . . . . . . . . . . . . . . . . . 733 xv 15.5.1 Filling missing values: fillna . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 733 15.5.2 Filling with a PandasObject factorize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1738 34.6.1.46 pandas.Index.fillna . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1738 34.6.1.47 pandas.Index factorize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1780 34.10.1.52pandas.MultiIndex.fillna . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1780 34.10.1.53pandas.MultiIndex0 码力 | 2207 页 | 8.59 MB | 2 年前3
pandas: powerful Python data analysis toolkit - 0.14.0raising on an object dtype (GH6555) • Bug in .xs with a nan in level when dropped (GH6574) • Bug in fillna with method=’bfill/ffill’ and datetime64[ns] dtype (GH6587) • Bug in sql writing with mixed dtypes indexer matched Int64Index of the corresponding axis and no re- ordering happened (GH6612) • Bug in fillna with limit and value specified • Bug in DataFrame.to_stata when columns have non-string names (GH4558) non bool-like (0/1) integers were being coverted into bools. (GH6806) • Regression from 0.13 with fillna and a Series on datetime-like (GH6344) • Bug in adding np.timedelta64 to DatetimeIndex with timezone0 码力 | 1349 页 | 7.67 MB | 2 年前3
pandas: powerful Python data analysis toolkit - 0.20.3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 702 15.5.1 Filling missing values: fillna . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 703 15.5.2 Filling with a PandasObject factorize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1645 34.6.1.46 pandas.Index.fillna . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1645 xxix 34.6.1.47 pandas factorize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1681 34.9.1.52 pandas.MultiIndex.fillna . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1681 34.9.1.53 pandas.MultiIndex0 码力 | 2045 页 | 9.18 MB | 2 年前3
pandas: powerful Python data analysis toolkit - 0.15meta- engine that automatically uses whichever version of openpyxl is installed. (GH7177) • DataFrame.fillna can now accept a DataFrame as a fill value (GH8377) • Passing multiple levels to stack() will now raising on an object dtype (GH6555) • Bug in .xs with a nan in level when dropped (GH6574) • Bug in fillna with method=’bfill/ffill’ and datetime64[ns] dtype (GH6587) • Bug in sql writing with mixed dtypes indexer matched Int64Index of the corresponding axis and no re- ordering happened (GH6612) • Bug in fillna with limit and value specified • Bug in DataFrame.to_stata when columns have non-string names (GH4558)0 码力 | 1579 页 | 9.15 MB | 2 年前3
pandas: powerful Python data analysis toolkit - 0.19.1GroupBy ..... 632 16.5 Cleaning / filling missing data ..... 632 16.5.1 Filling missing values: fillna ..... 632 16.5.2 Filling with a PandasObject ..... 634 16.5.3 Dropping axis labels with missing duplicated ..... 1575 pandas.Index.equals ..... 1576 pandas.Index.factorize ..... 1576 pandas.Index.fillna ..... 1576 pandas.Index.format ..... 1576 pandas.Index.get_duplicates ..... 1576 pandas.Index CategoricalIndex.equals ..... 1603 pandas.CategoricalIndex.factorize ..... 1603 pandas.CategoricalIndex.fillna ..... 1603 pandas.CategoricalIndex.format ..... 1603 pandas.CategoricalIndex.get_duplicates0 码力 | 1943 页 | 12.06 MB | 2 年前3
pandas: powerful Python data analysis toolkit - 0.17.0(GH10652) • Bug in DataFrame construction from nested dict with timedelta keys (GH11129) • Bug in .fillna against may raise TypeError when data contains datetime dtype (GH7095, GH11153) • Bug in .groupby Bug in .median() where non-float null values are not handled correctly (GH10040) • Bug in Series.fillna() where it raises if a numerically convertible string is given (GH10092) 1.4 v0.16.0 (March 22, 2015) grouper functions that need passed thru arguments (e.g. axis), when using wrapped function (e.g. fillna), (GH9221) • DataFrame now properly supports simultaneous copy and dtype arguments in constructor0 码力 | 1787 页 | 10.76 MB | 2 年前3
pandas: powerful Python data analysis toolkit - 0.15.1meta-engine that automatically uses whichever version of openpyxl is installed. (GH7177) • DataFrame.fillna can now accept a DataFrame as a fill value (GH8377) • Passing multiple levels to stack() will now raising on an object dtype (GH6555) • Bug in .xs with a nan in level when dropped (GH6574) • Bug in fillna with method='bfill/ffill' and datetime64[ns] dtype (GH6587) • Bug in sql writing with mixed indexer matched Int64Index of the corresponding axis and no re-ordering happened (GH6612) • Bug in fillna with limit and value specified • Bug in DataFrame.to_stata when columns have non-string names (GH4558)0 码力 | 1557 页 | 9.10 MB | 2 年前3
pandas: powerful Python data analysis toolkit - 1.1.1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 527 2.10.6 Filling missing values: fillna . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 527 2.10.7 Filling with a PandasObject value_y 1 B -0.282863 1.212112 3 D -1.135632 -0.173215 4 D -1.135632 0.119209 In [57]: outer_join.fillna(method='ffill') Out[57]: key value_x value_y 0 A 0.469112 NaN 1 B -0.282863 1.212112 2 C -1.509059 -1.135632 -0.173215 4 D -1.135632 0.119209 5 E -1.135632 -1.044236 In [58]: outer_join['value_x'].fillna(outer_join['value_x'].mean()) Out[58]: 0 0.469112 1 -0.282863 2 -1.509059 3 -1.135632 4 -1.1356320 码力 | 3231 页 | 10.87 MB | 2 年前3
共 34 条
- 1
- 2
- 3
- 4













