pandas: powerful Python data analysis toolkit - 0.25Series can of course just be passed into functions. However, if the function needs to be called in a chain, consider using the pipe() method. Compare the following # f, g, and h are functions taking and returning US/Eastern] In [272]: stz.dt.tz Out[272]:You can also chain these types of operations: In [273]: s.dt.tz_localize('UTC').dt.tz_convert('US/Eastern') Out[273]: raise an exception if the astype operation is invalid. Upcasting is always according to the numpy rules. If two different dtypes are involved in an operation, then the more general one will be used as the 0 码力 | 698 页 | 4.91 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 0.20.3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 716 15.6 Missing data casting rules and indexing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 717 16 Group By: split-apply-combine tuple of series or indices. This behaves like a standard binary operator with regards to broadcasting rules (GH14208). 1.6.2 API changes 1.6.2.1 Series.tolist() will now return Python types Series.tolist() exclusion of the keyword arguments (GH12399). • eval‘s upcasting rules for float32 types have been updated to be more consistent with NumPy’s rules. New behavior will not upcast to float64 if you multiply a0 码力 | 2045 页 | 9.18 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 0.20.2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 714 15.6 Missing data casting rules and indexing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 715 16 Group By: split-apply-combine tuple of series or indices. This behaves like a standard binary operator with regards to broadcasting rules (GH14208). 1.5.2 API changes 1.5.2.1 Series.tolist() will now return Python types Series.tolist() exclusion of the keyword arguments (GH12399). • eval’s upcasting rules for float32 types have been updated to be more consistent with NumPy’s rules. New behavior will not upcast to float64 if you multiply a0 码力 | 1907 页 | 7.83 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 0.21.1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 746 15.6 Missing data casting rules and indexing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 748 16 Group By: split-apply-combine tuple of series or indices. This behaves like a standard binary operator with regards to broadcasting rules (GH14208). 1.8.2 API changes 1.8.2.1 Series.tolist() will now return Python types Series.tolist() exclusion of the keyword arguments (GH12399). • eval‘s upcasting rules for float32 types have been updated to be more consistent with NumPy’s rules. New behavior will not upcast to float64 if you multiply a0 码力 | 2207 页 | 8.59 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 0.19.0. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 643 16.6 Missing data casting rules and indexing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 645 xii 17 Group tuple of series or indices. This behaves like a standard binary operator with regards to broadcasting rules (GH14208). API changes Series.tolist() will now return Python types Series.tolist() will now return exclusion of the keyword arguments (GH12399). • eval‘s upcasting rules for float32 types have been updated to be more consistent with NumPy’s rules. New behavior will not upcast to float64 if you multiply a0 码力 | 1937 页 | 12.03 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 0.19.1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 645 16.6 Missing data casting rules and indexing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 647 17 Group By: split-apply-combine tuple of series or indices. This behaves like a standard binary operator with regards to broadcasting rules (GH14208). API changes Series.tolist() will now return Python types Series.tolist() will now return exclusion of the keyword arguments (GH12399). • eval‘s upcasting rules for float32 types have been updated to be more consistent with NumPy’s rules. New behavior will not upcast to float64 if you multiply a0 码力 | 1943 页 | 12.06 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 1.1.1If axis labels are not passed, they will be constructed from the input data based on common sense rules. Note: When the data is a dict, and columns is not specified, the DataFrame columns will be ordered useful when you don’t have a reference to the DataFrame at hand. This is common when using assign in a chain of operations. For example, we can limit the DataFrame to just those observations with a Sepal Length DataFrames and Series can be passed into functions. However, if the function needs to be called in a chain, consider using the pipe() method. First some setup: In [141]: def extract_city_name(df): ....0 码力 | 3231 页 | 10.87 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 1.1.0If axis labels are not passed, they will be constructed from the input data based on common sense rules. Note: When the data is a dict, and columns is not specified, the DataFrame columns will be ordered useful when you don’t have a reference to the DataFrame at hand. This is common when using assign in a chain of operations. For example, we can limit the DataFrame to just those observations with a Sepal Length DataFrames and Series can be passed into functions. However, if the function needs to be called in a chain, consider using the pipe() method. First some setup: In [141]: def extract_city_name(df): ....0 码力 | 3229 页 | 10.87 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 1.0.0nan > 1 Out[6]: False In [7]: pd.NA > 1 Out[7]:For logical operations, pd.NA follows the rules of the three-valued logic (or Kleene logic). For example: In [8]: pd.NA | True Out[8]: True For warning. Series([], dtype: float64) 1.5.10 Result dtype inference changes for resample operations The rules for the result dtype in DataFrame.resample() aggregations have changed for extension types (GH31359) would attempt to convert the result back to the original dtype, falling back to the usual inference rules if that was not possible. Now, pandas will only return a result of the original dtype if the scalar 0 码力 | 3015 页 | 10.78 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 0.25.1Series can of course just be passed into functions. However, if the function needs to be called in a chain, consider using the pipe() method. Compare the following # f, g, and h are functions taking and returning \\\\\\\\\\\\\\\\\\\\\Out[272]: ˓→You can also chain these types of operations: In [273]: s.dt.tz_localize('UTC').dt.tz_convert('US/Eastern') Out[273]: raise an exception if the astype operation is invalid. Upcasting is always according to the numpy rules. If two different dtypes are involved in an operation, then the more general one will be used as the 0 码力 | 2833 页 | 9.65 MB | 1 年前3
共 32 条
- 1
- 2
- 3
- 4













