pandas: powerful Python data analysis toolkit - 0.13.1dimensional objects • Automatic and explicit data alignment: objects can be explicitly aligned to a set of labels, or the user can simply ignore the labels and let Series, DataFrame, etc. automatically align date_range(’20130101’,periods=10))) ...: In [9]: df.iloc[3:6,[0,2]] = np.nan # set to not display the null counts In [10]: pd.set_option(’max_info_rows’,0) In [11]: df.info() 4 Chapter 1. What’s New pandas: datetime64[ns] dtypes: datetime64[ns](1), float64(2) # this is the default (same as in 0.13.0) In [12]: pd.set_option(’max_info_rows’,max_info_rows) In [13]: df.info()Int64Index: 0 码力 | 1219 页 | 4.81 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 0.14.0dimensional objects • Automatic and explicit data alignment: objects can be explicitly aligned to a set of labels, or the user can simply ignore the labels and let Series, DataFrame, etc. automatically align out-of-bounds and drops the dimensions of the object will still raise IndexError (GH6296, GH6299). This could result in an empty axis (e.g. an empty DataFrame being returned) In [1]: dfl = DataFrame(np.random.randn(5 Index.astype() In [9]: i[[0,1,2]].astype(np.int_) Out[9]: Int64Index([1, 2, 3], dtype=’int32’) • set_index no longer converts MultiIndexes to an Index of tuples. For example, the old behavior returned0 码力 | 1349 页 | 7.67 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 0.12dimensional objects • Automatic and explicit data alignment: objects can be explicitly aligned to a set of labels, or the user can simply ignore the labels and let Series, DataFrame, etc. automatically align accepts regular expressions. 1.1.1 API changes • The I/O API is now much more consistent with a set of top level reader functions accessed like pd.read_csv() that generally return a pandas object. – In [7]: def func(dataf): ...: return dataf["val2"] - dataf["val2"].mean() ...: # squeezing the result frame to a series (because we have unique groups) In [8]: df2.groupby("val1", squeeze=True).apply(func)0 码力 | 657 页 | 3.58 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 0.15. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368 12.19 Set / Reset Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . dimensional objects • Automatic and explicit data alignment: objects can be explicitly aligned to a set of labels, or the user can simply ignore the labels and let Series, DataFrame, etc. automatically align DataFrame({’jim’:[0, 0, 1, 1], ...: ’joe’:[’x’, ’x’, ’z’, ’y’], ...: ’jolie’:np.random.rand(4)}).set_index([’jim’, ’joe’]) ...: In [2]: df Out[2]: jolie jim joe 0 x 0.179356 x 0.908835 1 z 0.5719810 码力 | 1579 页 | 9.15 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 0.15.1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359 12.19 Set / Reset Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . dimensional objects • Automatic and explicit data alignment: objects can be explicitly aligned to a set of labels, or the user can simply ignore the labels and let Series, DataFrame, etc. automatically align 3 0 4 0 dtype: float64 • groupby with as_index=False will not add erroneous extra columns to result (GH8582): In [5]: np.random.seed(2718281) In [6]: df = pd.DataFrame(np.random.randint(0, 100, (100 码力 | 1557 页 | 9.10 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 1.1.1objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390 2.5.21 Set / reset index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394 counts...) are easily calculable. These or custom aggregations can be applied on the entire data set, a sliding window of the data or grouped by categories. The latter is also known as the split-apply-combine user guide Straight to tutorial... pandas has great support for time series and has an extensive set of tools for working with dates, times, and time- indexed data. To introduction tutorial To user0 码力 | 3231 页 | 10.87 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 1.1.0objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390 2.5.21 Set / reset index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394 counts...) are easily calculable. These or custom aggregations can be applied on the entire data set, a sliding window of the data or grouped by categories. The latter is also known as the split-apply-combine user guide Straight to tutorial... pandas has great support for time series and has an extensive set of tools for working with dates, times, and time- indexed data. To introduction tutorial To user0 码力 | 3229 页 | 10.87 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 1.3.2objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438 2.5.22 Set / reset index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441 counts...) are easily calculable. These or custom aggregations can be applied on the entire data set, a sliding window of the data, or grouped by categories. The latter is also known as the split-apply-combine user guide Straight to tutorial... pandas has great support for time series and has an extensive set of tools for working with dates, times, and time- indexed data. 4 Chapter 1. Getting started pandas:0 码力 | 3509 页 | 14.01 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 1.3.4objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458 2.5.22 Set / reset index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461 counts...) are easily calculable. These or custom aggregations can be applied on the entire data set, a sliding window of the data, or grouped by categories. The latter is also known as the split-apply-combine user guide Straight to tutorial... pandas has great support for time series and has an extensive set of tools for working with dates, times, and time-indexed data. 4 Chapter 1. Getting started pandas:0 码力 | 3605 页 | 14.68 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 1.3.3objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458 2.5.22 Set / reset index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461 counts...) are easily calculable. These or custom aggregations can be applied on the entire data set, a sliding window of the data, or grouped by categories. The latter is also known as the split-apply-combine user guide Straight to tutorial... pandas has great support for time series and has an extensive set of tools for working with dates, times, and time-indexed data. 4 Chapter 1. Getting started pandas:0 码力 | 3603 页 | 14.65 MB | 1 年前3
共 32 条
- 1
- 2
- 3
- 4













