pandas: powerful Python data analysis toolkit - 1.5.0rc0table representation of our data would look very similar: Each column in a DataFrame is a Series I’m just interested in working with the data in the column Age In [4]: df["Age"] Out[4]: 0 22 1 35 2 can apply to a DataFrame or Series. As methods are functions, do not forget to use parentheses (). I’m interested in some basic statistics of the numerical data of my data table In [9]: df.describe() Out[9]: C123 S 4 5 0 3 Allen, Mr. William Henry ␣ ˓→male ... 0 373450 8.0500 NaN S [5 rows x 12 columns] I’m interested in a technical summary of a DataFrame In [9]: titanic.info()0 码力 | 3943 页 | 15.73 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 0.12In [44]: s.dtype dtype(’<M8[ns]’) In [45]: s[1] = np.nan In [46]: s 0 2001-01-02 00:00:00 1 NaT 2 2001-01-02 00:00:00 dtype: datetime64[ns] In [47]: s.dtype dtype(’<M8[ns]’) In [48]: s = s.astype(’O’) date_range("2001-10-1", periods=5, freq=’M’) In [55]: ts = Series(np.random.rand(len(idx)),index=idx) In [56]: ts[’2001’] 2001-10-31 0.745574 2001-11-30 0.203280 2001-12-31 0.951437 Freq: M, dtype: float64 In [57]: added option display.max_info_rows to prevent verbose_info from being calculated for frames above 1M rows (configurable). (GH2807, GH2918) • value_counts() now accepts a “normalize” argument, for normalized0 码力 | 657 页 | 3.58 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 1.4.4pandas: powerful Python data analysis toolkit, Release 1.4.4 Each column in a DataFrame is a Series I’m just interested in working with the data in the column Age In [4]: df["Age"] Out[4]: 0 22 1 35 2 can apply to a DataFrame or Series. As methods are functions, do not forget to use parentheses (). I’m interested in some basic statistics of the numerical data of my data table 1.4. Tutorials 17 pandas: C123 S 4 5 0 3 Allen, Mr. William Henry ␣ ˓→male ... 0 373450 8.0500 NaN S [5 rows x 12 columns] I’m interested in a technical summary of a DataFrame In [9]: titanic.info()0 码力 | 3743 页 | 15.26 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 1.4.2pandas: powerful Python data analysis toolkit, Release 1.4.2 Each column in a DataFrame is a Series I’m just interested in working with the data in the column Age In [4]: df["Age"] Out[4]: 0 22 1 35 2 can apply to a DataFrame or Series. As methods are functions, do not forget to use parentheses (). I’m interested in some basic statistics of the numerical data of my data table 1.4. Tutorials 17 pandas: 1000 C123 S 4 5 0 3 Allen, Mr. William Henry ...␣ ˓→ 373450 8.0500 NaN S [5 rows x 12 columns] I’m interested in a technical summary of a DataFrame In [9]: titanic.info()0 码力 | 3739 页 | 15.24 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 1.3.2pandas: powerful Python data analysis toolkit, Release 1.3.2 Each column in a DataFrame is a Series I’m just interested in working with the data in the column Age In [4]: df["Age"] Out[4]: 0 22 1 35 2 can apply to a DataFrame or Series. As methods are functions, do not forget to use parentheses (). I’m interested in some basic statistics of the numerical data of my data table In [9]: df.describe() Out[9]: 1000 C123 S 4 5 0 3 Allen, Mr. William Henry . ˓→.. 373450 8.0500 NaN S [5 rows x 12 columns] I’m interested in a technical summary of a DataFrame In [9]: titanic.info()0 码力 | 3509 页 | 14.01 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 1.3.3pandas: powerful Python data analysis toolkit, Release 1.3.3 Each column in a DataFrame is a Series I’m just interested in working with the data in the column Age In [4]: df["Age"] Out[4]: 0 22 1 35 2 can apply to a DataFrame or Series. As methods are functions, do not forget to use parentheses (). I’m interested in some basic statistics of the numerical data of my data table 1.4. Tutorials 17 pandas: C123 S 4 5 0 3 Allen, Mr. William Henry ␣ ˓→male ... 0 373450 8.0500 NaN S [5 rows x 12 columns] I’m interested in a technical summary of a DataFrame In [9]: titanic.info()0 码力 | 3603 页 | 14.65 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 1.3.4pandas: powerful Python data analysis toolkit, Release 1.3.4 Each column in a DataFrame is a Series I’m just interested in working with the data in the column Age In [4]: df["Age"] Out[4]: 0 22 1 35 2 can apply to a DataFrame or Series. As methods are functions, do not forget to use parentheses (). I’m interested in some basic statistics of the numerical data of my data table 1.4. Tutorials 17 pandas: 0 113803 53.1000 C123 S 4 5 0 3 Allen, Mr. William Henry ␣ ˓→male 35.0 0 0 373450 8.0500 NaN S I’m interested in a technical summary of a DataFrame In [9]: titanic.info()0 码力 | 3605 页 | 14.68 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 0.13.1convert it to a single-column DataFrame (GH5164) • All R datasets listed here http://stat.ethz.ch/R-manual/R-devel/library/datasets/html/00Index.html can now be loaded into Pandas objects import pandas.rpy [44]: s.dtype Out[44]: dtype(’<M8[ns]’) In [45]: s[1] = np.nan In [46]: s Out[46]: 0 2001-01-02 1 NaT 2 2001-01-02 dtype: datetime64[ns] In [47]: s.dtype Out[47]: dtype(’<M8[ns]’) 50 Chapter 1. What’s , periods=5, freq=’M’) In [55]: ts = Series(np.random.rand(len(idx)),index=idx) In [56]: ts[’2001’] Out[56]: 2001-10-31 0.483450 2001-11-30 0.407530 2001-12-31 0.965096 Freq: M, dtype: float64 In0 码力 | 1219 页 | 4.81 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 0.14.010:00:00 2013-09-05 10:00:00 1 In [78]: pivot_table(df, index=Grouper(freq=’M’, key=’Date’), ....: columns=Grouper(freq=’M’, key=’PayDay’), ....: values=’Quantity’, aggfunc=np.sum) ....: Out[78]: PayDay convert it to a single-column DataFrame (GH5164) • All R datasets listed here http://stat.ethz.ch/R-manual/R-devel/library/datasets/html/00Index.html can now be loaded into Pandas objects import pandas.rpy Series([datetime.datetime(2001, 1, 2, 0, 0) for i in range(3)]) In [45]: s.dtype Out[45]: dtype(’<M8[ns]’) In [46]: s[1] = np.nan In [47]: s Out[47]: 0 2001-01-02 1.5. v0.11.0 (April 22, 2013) 770 码力 | 1349 页 | 7.67 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 1.2.3pandas: powerful Python data analysis toolkit, Release 1.2.3 Each column in a DataFrame is a Series I’m just interested in working with the data in the column Age In [4]: df["Age"] Out[4]: 0 22 1 35 2 can apply to a DataFrame or Series. As methods are functions, do not forget to use parentheses (). I’m interested in some basic statistics of the numerical data of my data table In [9]: df.describe() Out[9]: previous page) 4 5 0 3 Allen, Mr. William Henry . ˓→.. 373450 8.0500 NaN S [5 rows x 12 columns] I’m interested in a technical summary of a DataFrame In [9]: titanic.info()0 码力 | 3323 页 | 12.74 MB | 1 年前3
共 32 条
- 1
- 2
- 3
- 4













