深度学习与PyTorch入门实战 - 54. AutoEncoder自编码器0 码力 | 29 页 | 3.49 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 0.24.0page) In [7]: df.loc[0, 'b'] Out[7]: 'nan' New Behavior: In [53]: data = 'a,b,c\n1,,3\n4,5,6' In [54]: df = pd.read_csv(StringIO(data), engine='python', dtype=str, na_filter=True) In [55]: df.loc[0, Sandrine Pataut + • Sangwoong Yoon • Santosh Kumar + • Saurav Chakravorty + • Scott McAllister + 54 Chapter 1. What’s New in 0.24.0 (January 25, 2019) pandas: powerful Python data analysis toolkit, A where operation with setting. In [52]: df2 = df.copy() In [53]: df2[df2 > 0] = -df2 In [54]: df2 Out[54]: A B C D F 2013-01-01 0.000000 0.000000 -1.947263 -5 NaN 2013-01-02 -0.488388 -0.003789 -00 码力 | 2973 页 | 9.90 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 1.0.02013-01-03 1.789156 0.984494 1.794371 -0.110487 2013-01-01 -0.521273 1.461184 -0.495508 1.027403 54 Chapter 2. Getting started pandas: powerful Python data analysis toolkit, Release 1.0.0 2.3.3 Selection A where operation with setting. In [52]: df2 = df.copy() In [53]: df2[df2 > 0] = -df2 In [54]: df2 Out[54]: A B C D F 2013-01-01 0.000000 0.000000 -0.495508 -5 NaN 2013-01-02 -1.217227 -0.814532 -1 context, use the method bool(): In [53]: pd.Series([True]).bool() Out[53]: True In [54]: pd.Series([False]).bool() Out[54]: False In [55]: pd.DataFrame([[True]]).bool() Out[55]: True In [56]: pd.DataFrame([[False]])0 码力 | 3015 页 | 10.78 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 0.25.0Applying a binary ufunc like numpy.power() now aligns the inputs when both are Series (GH23293). In [54]: s1 = pd.Series([1, 2, 3], index=['a', 'b', 'c']) In [55]: s2 = pd.Series([3, 4, 5], index=['d', A where operation with setting. In [52]: df2 = df.copy() In [53]: df2[df2 > 0] = -df2 In [54]: df2 Out[54]: A B C D F 2013-01-01 0.000000 0.000000 -1.126404 -5 NaN 2013-01-02 -0.275165 -0.804503 -0 0.000000 -1.126404 5 NaN 2013-01-02 0.275165 0.804503 -0.679470 10 1.0 (continues on next page) 54 Chapter 3. Getting started pandas: powerful Python data analysis toolkit, Release 0.25.0 (continued0 码力 | 2827 页 | 9.62 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 0.25.1Applying a binary ufunc like numpy.power() now aligns the inputs when both are Series (GH23293). In [54]: s1 = pd.Series([1, 2, 3], index=['a', 'b', 'c']) In [55]: s2 = pd.Series([3, 4, 5], index=['d', A where operation with setting. In [52]: df2 = df.copy() In [53]: df2[df2 > 0] = -df2 In [54]: df2 Out[54]: A B C D F 2013-01-01 0.000000 0.000000 -0.612266 -5 NaN 2013-01-02 -0.348338 -1.733068 -1 000000 0.000000 0.612266 5 NaN 2013-01-02 -0.348338 1.733068 1.838330 10 1.0 (continues on next page) 54 Chapter 3. Getting started pandas: powerful Python data analysis toolkit, Release 0.25.1 (continued0 码力 | 2833 页 | 9.65 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 1.0.4A where operation with setting. In [52]: df2 = df.copy() In [53]: df2[df2 > 0] = -df2 In [54]: df2 Out[54]: A B C D F 2013-01-01 0.000000 0.000000 -1.222775 -5 NaN 2013-01-02 -0.291550 -1.167807 -1 ...: index_col=0, parse_dates=True) ...: In [3]: air_quality.head() (continues on next page) 54 Chapter 1. Getting started pandas: powerful Python data analysis toolkit, Release 1.0.4 (continued analysis toolkit, Release 1.0.4 In [53]: pd.Series([True]).bool() Out[53]: True In [54]: pd.Series([False]).bool() Out[54]: False In [55]: pd.DataFrame([[True]]).bool() Out[55]: True In [56]: pd.DataFrame([[False]])0 码力 | 3081 页 | 10.24 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 1.0A where operation with setting. In [52]: df2 = df.copy() In [53]: df2[df2 > 0] = -df2 In [54]: df2 Out[54]: A B C D F 2013-01-01 0.000000 0.000000 -0.261392 -5 NaN 2013-01-02 -0.471064 -0.748347 -0 ...: index_col=0, parse_dates=True) ...: In [3]: air_quality.head() (continues on next page) 54 Chapter 1. Getting started pandas: powerful Python data analysis toolkit, Release 1.0.5 (continued analysis toolkit, Release 1.0.5 In [53]: pd.Series([True]).bool() Out[53]: True In [54]: pd.Series([False]).bool() Out[54]: False In [55]: pd.DataFrame([[True]]).bool() Out[55]: True In [56]: pd.DataFrame([[False]])0 码力 | 3091 页 | 10.16 MB | 1 年前3
pandas: powerful Python data analysis toolkit -1.0.3A where operation with setting. In [52]: df2 = df.copy() In [53]: df2[df2 > 0] = -df2 In [54]: df2 Out[54]: A B C D F 2013-01-01 0.000000 0.000000 -0.935783 -5 NaN 2013-01-02 -1.093443 -1.279622 -0 plot.box(), which refers to a boxplot. The box method is applicable on the air quality example data: 54 Chapter 2. Getting started pandas: powerful Python data analysis toolkit, Release 1.0.3 In [9]: air_quality analysis toolkit, Release 1.0.3 In [53]: pd.Series([True]).bool() Out[53]: True In [54]: pd.Series([False]).bool() Out[54]: False In [55]: pd.DataFrame([[True]]).bool() Out[55]: True In [56]: pd.DataFrame([[False]])0 码力 | 3071 页 | 10.10 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 1.1.12 and Class 3. • Name: Name of passenger. • Sex: Gender of passenger. • Age: Age of passenger. 54 Chapter 1. Getting started pandas: powerful Python data analysis toolkit, Release 1.1.1 • SibSp: started pandas: powerful Python data analysis toolkit, Release 1.1.1 In [54]: outer_join[pd.isna(outer_join['value_x'])] Out[54]: key value_x value_y 5 E NaN -1.044236 In [55]: outer_join[pd.notna( Out[53]: 0 NaN 1 0.929249 2 NaN 3 -1.308847 4 -1.016424 5 NaN dtype: float64 In [54]: outer_join['value_x'].sum() Out[54]: -3.5940742896293765 One difference is that missing data cannot be compared to0 码力 | 3231 页 | 10.87 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 1.1.02 and Class 3. • Name: Name of passenger. • Sex: Gender of passenger. • Age: Age of passenger. 54 Chapter 1. Getting started pandas: powerful Python data analysis toolkit, Release 1.1.0 • SibSp: started pandas: powerful Python data analysis toolkit, Release 1.1.0 In [54]: outer_join[pd.isna(outer_join['value_x'])] Out[54]: key value_x value_y 5 E NaN -1.044236 In [55]: outer_join[pd.notna( Out[53]: 0 NaN 1 0.929249 2 NaN 3 -1.308847 4 -1.016424 5 NaN dtype: float64 In [54]: outer_join['value_x'].sum() Out[54]: -3.5940742896293765 One difference is that missing data cannot be compared to0 码力 | 3229 页 | 10.87 MB | 1 年前3
共 335 条
- 1
- 2
- 3
- 4
- 5
- 6
- 34













