pandas: powerful Python data analysis toolkit - 0.25.0this: In [8]: pd.MultiIndex.from_product([['a', 'abc'], range(500)]) Out[8]: MultiIndex([( 'a', 0), ( 'a', 1), ( 'a', 2), ( 'a', 3), ( 'a', 4), ( 'a', 5), ( 'a', 6), ( 'a', 7), ( 'a', 8), (continues IntervalArray have gained an is_empty attribute denoting if the given interval(s) are empty (GH27219) 8 Chapter 1. What’s new in 0.25.0 (July 18, 2019) pandas: powerful Python data analysis toolkit, Release (GH16316). In [42]: ii = pd.IntervalIndex.from_tuples([(0, 4), (1, 5), (5, 8)]) In [43]: ii Out[43]: IntervalIndex([(0, 4], (1, 5], (5, 8]], closed='right', dtype='interval[int64]') 1.2. Backwards incompatible0 码力 | 2827 页 | 9.62 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 0.25.1structure of the MultiIndex. (GH13480): The repr now looks like this: In [8]: pd.MultiIndex.from_product([['a', 'abc'], range(500)]) Out[8]: MultiIndex([( 'a', 0), ( 'a', 1), ( 'a', 2), ( 'a', 3), ( 'a' pandas: powerful Python data analysis toolkit, Release 0.25.1 (continued from previous page) ( 'a', 8), ( 'a', 9), ... ('abc', 490), ('abc', 491), ('abc', 492), ('abc', 493), ('abc', 494), ('abc', 495) IntervalArray have gained an is_empty attribute denoting if the given interval(s) are empty (GH27219) 8 Chapter 1. What’s new in 0.25.0 (July 18, 2019) pandas: powerful Python data analysis toolkit, Release0 码力 | 2833 页 | 9.65 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 0.24.01 2 2 NaN Length: 2, dtype: Int64 # operate with other dtypes In [6]: s + s.iloc[1:3].astype('Int8') \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ 01 1 2.01 2 NaN Length: 3, dtype: float64 These dtypes can operate as part of a DataFrame. In [8]: df = pd.DataFrame({'A': s, 'B': [1, 1, 3], 'C': list('aab')}) In [9]: df Out[9]: A B C 0 1 1 a Warning: The Integer NA support currently uses the capitalized dtype version, e.g. Int8 as compared to the traditional int8. This may be changed at a future date. See Nullable Integer Data Type for more.0 码力 | 2973 页 | 9.90 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 0.25(GH27900). 3 pandas: powerful Python data analysis toolkit, Release 0.25.3 1.2 Contributors A total of 8 people contributed patches to this release. People with a + by their names contributed a patch for the not installed, pandas will raise an ImportError when the method requiring that dependency is called. 8 Chapter 2. Installation pandas: powerful Python data analysis toolkit, Release 0.25.3 Dependency Minimum values, letting pandas create a default integer index: In [3]: s = pd.Series([1, 3, 5, np.nan, 6, 8]) In [4]: s Out[4]: 0 1.0 1 3.0 2 5.0 3 NaN 4 6.0 5 8.0 dtype: float64 Creating a DataFrame0 码力 | 698 页 | 4.91 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 0.13.1Axis Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 8 Intro to Data Structures 147 8.1 Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . null counts for large frames (GH5974) In [7]: max_info_rows = pd.get_option(’max_info_rows’) In [8]: df = DataFrame(dict(A = np.random.randn(10), ...: B = np.random.randn(10), ...: C = date_range(’20130101’ 542019 B 0.233222 0.968872 -4.067618 C 0.244554 2.925382 -1.702876 D 5.361861 -0.725465 -2.106863 8 Chapter 1. What’s New pandas: powerful Python data analysis toolkit, Release 0.13.1 [4 rows x 3 columns]0 码力 | 1219 页 | 4.81 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 0.12(Experimental) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 8 Essential Basic Functionality 133 8.1 Head and Tail . . . . . . . . . . . . . . . . . . . . . . . numpy bug that treats integer and float dtypes differently. In [1]: p = DataFrame({ ’first’ : [4,5,8], ’second’ : [0,0,3] }) In [2]: p % 0 first second 0 NaN NaN 1 NaN NaN 2 NaN NaN In [3]: p % p 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 0.5 1 -0.5 2 7.5 3 -7.5 Name: 1, dtype: float640 码力 | 657 页 | 3.58 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 0.20.3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385 3.5.1.2 Python (PEP8) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386 3.5.1.3 Backwards Compatibility Example Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460 8 Intro to Data Structures 461 8.1 Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1636 34.6.1.2 pandas.Index.asi8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1636 34.6.1.3 pandas.Index.base0 码力 | 2045 页 | 9.18 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 1.0.0operations, pd.NA follows the rules of the three-valued logic (or Kleene logic). For example: In [8]: pd.NA | True Out[8]: True For more, see NA section in the user guide on missing data. 1.3.2 Dedicated string (GH30114) • Added new writer for exporting Stata dta files in versions 118 and 119, StataWriterUTF8. These files formats support exporting strings containing Unicode characters. Format 119 supports data python 3.8 and above (GH28115) • DataFrame.to_pickle() and read_pickle() now accept URL (GH30163) 8 Chapter 1. What’s new in 1.0.0 (January 29, 2020) pandas: powerful Python data analysis toolkit, Release0 码力 | 3015 页 | 10.78 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 0.20.2. . . . . . . . . . . . . . . . . . . . . . . . . 8 1.2.1.1 agg API for DataFrame/Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.2.1.2 dtype keyword for data IO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383 3.5.1.2 Python (PEP8) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384 3.5.1.3 Backwards Compatibility Example Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457 8 Intro to Data Structures 459 8.1 Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . .0 码力 | 1907 页 | 7.83 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 0.21.1. . . . . . . . . . . . . . . . . . . . . . . . . 8 1.2.1.1 Integration with Apache Parquet file format . . . . . . . . . . . . . . . . . . . . . 8 1.2.1.2 infer_objects type conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412 ix 3.5.1.2 Python (PEP8) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413 3.5.1.3 Backwards Compatibility Example Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487 8 Intro to Data Structures 489 8.1 Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . .0 码力 | 2207 页 | 8.59 MB | 1 年前3
共 32 条
- 1
- 2
- 3
- 4













