pandas: powerful Python data analysis toolkit - 1.0.0
dta files. (GH28250) • Implemented pandas.core.window.Window.var() and pandas.core.window.Window. std() functions (GH26597) • Added encoding argument to DataFrame.to_string() for non-ascii text (GH28766) Out[19]: A B C D count 6.000000 6.000000 6.000000 6.000000 mean 0.310930 0.245775 0.171624 0.440732 std 1.084312 0.963592 1.196921 1.000783 min -1.217227 -0.814532 -1.308438 -1.013948 25% -0.365672 -0 of the same size. Generally speaking, these methods take an axis argument, just like ndarray.{sum, std, ...}, but the axis can be specified by name or integer: • Series: no axis argument needed • DataFrame:0 码力 | 3015 页 | 10.78 MB | 1 年前3pandas: powerful Python data analysis toolkit - 0.12
to performing these operations on, for example, a DataFrame of slice objects: – sum, prod, mean, std, var, skew, kurt, corr, and cov • read_html now defaults to None when reading, and falls back on bs4 powerful Python data analysis toolkit, Release 0.12.0 Regular string replacement still works as expected. For example, you can do In [30]: df.replace(’.’, np.nan) a b 0 a 1 1 b 2 2 NaN 3 3 NaN 4 expectedrows=an integer to the first append, to set the TOTAL number of expectedrows that PyTables will expected. This will optimize read/write performance. • Select now supports passing start and stop to provide0 码力 | 657 页 | 3.58 MB | 1 年前3pandas: powerful Python data analysis toolkit - 0.25.1
Out[19]: A B C D count 6.000000 6.000000 6.000000 6.000000 mean -0.107403 0.422776 0.625745 0.226095 std 0.617714 0.888623 0.880087 0.779514 min -0.827664 -0.795830 -0.614256 -1.275619 25% -0.382594 -0 of the same size. Generally speaking, these methods take an axis argument, just like ndarray.{sum, std, ...}, but the axis can be specified by name or integer: • Series: no axis argument needed • DataFrame: mean()) / df.std() In [83]: ts_stand.std() Out[83]: one 1.0 two 1.0 three 1.0 dtype: float64 In [84]: xs_stand = df.sub(df.mean(1), axis=0).div(df.std(1), axis=0) In [85]: xs_stand.std(1) Out[85]:0 码力 | 2833 页 | 9.65 MB | 1 年前3pandas: powerful Python data analysis toolkit - 1.2.0
analysis toolkit, Release 1.2.0 (continued from previous page) Age count 3.000000 mean 38.333333 std 18.230012 min 22.000000 25% 28.500000 50% 35.000000 75% 46.500000 max 58.000000 The describe() titanic[["Age", "Fare"]].describe() Out[6]: Age Fare count 714.000000 891.000000 mean 29.699118 32.204208 std 14.526497 49.693429 min 0.420000 0.000000 25% 20.125000 7.910400 50% 28.000000 14.454200 75% 38 In [26]: grouped = df.groupby(["month", "week"]) In [27]: grouped["x"].agg([np.mean, np.std]) Out[27]: mean std month week 5 1 63.653367 40.601965 2 78.126605 53.342400 3 92.091886 57.630110 6 1 810 码力 | 3313 页 | 10.91 MB | 1 年前3pandas: powerful Python data analysis toolkit - 1.2.3
analysis toolkit, Release 1.2.3 (continued from previous page) Age count 3.000000 mean 38.333333 std 18.230012 min 22.000000 25% 28.500000 50% 35.000000 75% 46.500000 max 58.000000 The describe() titanic[["Age", "Fare"]].describe() Out[6]: Age Fare count 714.000000 891.000000 mean 29.699118 32.204208 std 14.526497 49.693429 min 0.420000 0.000000 25% 20.125000 7.910400 50% 28.000000 14.454200 75% 38 In [26]: grouped = df.groupby(["month", "week"]) In [27]: grouped["x"].agg([np.mean, np.std]) Out[27]: mean std month week 5 1 63.653367 40.601965 2 78.126605 53.342400 3 92.091886 57.630110 6 1 810 码力 | 3323 页 | 12.74 MB | 1 年前3pandas: powerful Python data analysis toolkit - 1.3.2
analysis toolkit, Release 1.3.2 (continued from previous page) Age count 3.000000 mean 38.333333 std 18.230012 min 22.000000 25% 28.500000 50% 35.000000 75% 46.500000 max 58.000000 The describe() titanic[["Age", "Fare"]].describe() Out[6]: Age Fare count 714.000000 891.000000 mean 29.699118 32.204208 std 14.526497 49.693429 min 0.420000 0.000000 25% 20.125000 7.910400 50% 28.000000 14.454200 75% 38 In [26]: grouped = df.groupby(["month", "week"]) In [27]: grouped["x"].agg([np.mean, np.std]) Out[27]: mean std month week 5 1 63.653367 40.601965 2 78.126605 53.342400 3 92.091886 57.630110 6 1 810 码力 | 3509 页 | 14.01 MB | 1 年前3pandas: powerful Python data analysis toolkit - 1.3.3
analysis toolkit, Release 1.3.3 In [9]: df.describe() Out[9]: Age count 3.000000 mean 38.333333 std 18.230012 min 22.000000 25% 28.500000 50% 35.000000 75% 46.500000 max 58.000000 The describe() titanic[["Age", "Fare"]].describe() Out[6]: Age Fare count 714.000000 891.000000 mean 29.699118 32.204208 std 14.526497 49.693429 min 0.420000 0.000000 25% 20.125000 7.910400 50% 28.000000 14.454200 75% 38 In [26]: grouped = df.groupby(["month", "week"]) In [27]: grouped["x"].agg([np.mean, np.std]) Out[27]: mean std month week 5 1 63.653367 40.601965 2 78.126605 53.342400 3 92.091886 57.630110 6 1 810 码力 | 3603 页 | 14.65 MB | 1 年前3pandas: powerful Python data analysis toolkit - 1.3.4
analysis toolkit, Release 1.3.4 In [9]: df.describe() Out[9]: Age count 3.000000 mean 38.333333 std 18.230012 min 22.000000 25% 28.500000 50% 35.000000 75% 46.500000 max 58.000000 The describe() titanic[["Age", "Fare"]].describe() Out[6]: Age Fare count 714.000000 891.000000 mean 29.699118 32.204208 std 14.526497 49.693429 min 0.420000 0.000000 25% 20.125000 7.910400 50% 28.000000 14.454200 75% 38 In [26]: grouped = df.groupby(["month", "week"]) In [27]: grouped["x"].agg([np.mean, np.std]) Out[27]: mean std month week 5 1 63.653367 40.601965 2 78.126605 53.342400 3 92.091886 57.630110 6 1 810 码力 | 3605 页 | 14.68 MB | 1 年前3pandas: powerful Python data analysis toolkit - 0.25.0
A B C D count 6.000000 6.000000 6.000000 6.000000 mean -0.652472 -0.584036 0.453908 -0.033050 std 0.739553 0.717281 0.924536 0.791607 min -1.632181 -1.035754 -1.126404 -1.623695 25% -1.157100 -1 of the same size. Generally speaking, these methods take an axis argument, just like ndarray.{sum, std, ...}, but the axis can be specified by name or integer: • Series: no axis argument needed • DataFrame: mean()) / df.std() In [83]: ts_stand.std() Out[83]: one 1.0 two 1.0 three 1.0 dtype: float64 In [84]: xs_stand = df.sub(df.mean(1), axis=0).div(df.std(1), axis=0) In [85]: xs_stand.std(1) Out[85]:0 码力 | 2827 页 | 9.62 MB | 1 年前3pandas: powerful Python data analysis toolkit - 1.1.1
numerical data of my data table In [9]: df.describe() Out[9]: Age count 3.000000 mean 38.333333 std 18.230012 min 22.000000 25% 28.500000 50% 35.000000 75% 46.500000 max 58.000000 The describe() titanic[["Age", "Fare"]].describe() Out[6]: Age Fare count 714.000000 891.000000 mean 29.699118 32.204208 std 14.526497 49.693429 min 0.420000 0.000000 25% 20.125000 7.910400 50% 28.000000 14.454200 75% 38 toolkit, Release 1.1.1 (continued from previous page) In [27]: grouped['x'].agg([np.mean, np.std]) Out[27]: mean std month week 5 1 63.653367 40.601965 2 78.126605 53.342400 3 92.091886 57.630110 6 1 810 码力 | 3231 页 | 10.87 MB | 1 年前3
共 251 条
- 1
- 2
- 3
- 4
- 5
- 6
- 26