pandas: powerful Python data analysis toolkit - 0.25'E': pd.Series([1.0] * 3).astype('float32'), .....: 'F': False, .....: 'G': pd.Series([1] * 3, dtype='int8')}) .....: In [329]: dft 92 Chapter 3. Getting started pandas: powerful Python data analysis toolkit False 1 In [330]: dft.dtypes Out[330]: A float64 B int64 C object D datetime64[ns] E float32 F bool G int8 dtype: object On a Series object, use the dtype attribute. In [331]: dft['A'].dtype Out[331]: dtype('float64') dtypes. value_counts(). In [334]: dft.dtypes.value_counts() Out[334]: datetime64[ns] 1 object 1 int8 1 bool 1 float64 1 (continues on next page) 3.3. Essential basic functionality 93 pandas: powerful0 码力 | 698 页 | 4.91 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 1.0.0[]]' IntervalIn- dex nullable inte- ger Int64Dtype, . . . (none) arrays. IntegerArray 'Int8', 'Int16', 'Int32', 'Int64', 'UInt8', 'UInt16', 'UInt32', 'UInt64' Nullable integer data type Strings pd.Series([1.0] * 3).astype('float32'), .....: 'F': False, .....: 'G': pd.Series([1] * 3, dtype='int8')}) .....: In [334]: dft Out[334]: A B C D E F G 0 0.483810 1 foo 2001-01-02 1.0 False 1 1 0 In [335]: dft.dtypes Out[335]: A float64 B int64 C object D datetime64[ns] E float32 F bool G int8 dtype: object On a Series object, use the dtype attribute. In [336]: dft['A'].dtype Out[336]: dtype('float64') 0 码力 | 3015 页 | 10.78 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 0.25.0• Improved performance of Series.searchsorted(). The speedup is especially large when the dtype is int8/int16/int32 and the searched key is within the integer bounds for the dtype (GH22034) • Improved pd.Series([1.0] * 3).astype('float32'), .....: 'F': False, .....: 'G': pd.Series([1] * 3, dtype='int8')}) .....: In [329]: dft Out[329]: A B C D E F G 0 0.479978 1 foo 2001-01-02 1.0 False 1 1 0 \\\\\\\\\\\\\\\Out[330]: ˓→ A float64 B int64 C object D datetime64[ns] E float32 F bool G int8 dtype: object On a Series object, use the dtype attribute. In [331]: dft['A'].dtype Out[331]: dtype('float64')0 码力 | 2827 页 | 9.62 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 0.25.1• Improved performance of Series.searchsorted(). The speedup is especially large when the dtype is int8/int16/int32 and the searched key is within the integer bounds for the dtype (GH22034) • Improved pd.Series([1.0] * 3).astype('float32'), .....: 'F': False, .....: 'G': pd.Series([1] * 3, dtype='int8')}) .....: In [329]: dft Out[329]: A B C D E F G 0 0.864142 1 foo 2001-01-02 1.0 False 1 1 0 \\\\\\\\\\\\\\\Out[330]: ˓→ A float64 B int64 C object D datetime64[ns] E float32 F bool G int8 dtype: object On a Series object, use the dtype attribute. In [331]: dft['A'].dtype Out[331]: dtype('float64')0 码力 | 2833 页 | 9.65 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 1.0[]]' IntervalIn- dex nullable inte- ger Int64Dtype, . . . (none) arrays. IntegerArray 'Int8', 'Int16', 'Int32', 'Int64', 'UInt8', 'UInt16', 'UInt32', 'UInt64' Nullable integer data type Strings pd.Series([1.0] * 3).astype('float32'), .....: 'F': False, .....: 'G': pd.Series([1] * 3, dtype='int8')}) .....: In [334]: dft Out[334]: A B C D E F G 0 0.035962 1 foo 2001-01-02 1.0 False 1 1 0 In [335]: dft.dtypes Out[335]: A float64 B int64 C object D datetime64[ns] E float32 F bool G int8 dtype: object On a Series object, use the dtype attribute. In [336]: dft['A'].dtype Out[336]: dtype('float64') 0 码力 | 3091 页 | 10.16 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 1.0.4[]]' IntervalIn- dex nullable inte- ger Int64Dtype, . . . (none) arrays. IntegerArray 'Int8', 'Int16', 'Int32', 'Int64', 'UInt8', 'UInt16', 'UInt32', 'UInt64' Nullable integer data type Strings pd.Series([1.0] * 3).astype('float32'), .....: 'F': False, .....: 'G': pd.Series([1] * 3, dtype='int8')}) .....: In [334]: dft Out[334]: A B C D E F G 0 0.035962 1 foo 2001-01-02 1.0 False 1 1 0 In [335]: dft.dtypes Out[335]: A float64 B int64 C object D datetime64[ns] E float32 F bool G int8 dtype: object On a Series object, use the dtype attribute. In [336]: dft['A'].dtype Out[336]: dtype('float64') 0 码力 | 3081 页 | 10.24 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 1.1.1[]]' IntervalIn- dex nullable inte- ger Int64Dtype, . . . (none) arrays. IntegerArray 'Int8', 'Int16', 'Int32', 'Int64', 'UInt8', 'UInt16', 'UInt32', 'UInt64' Nullable integer data type Strings pd.Series([1.0] * 3).astype('float32'), .....: 'F': False, .....: 'G': pd.Series([1] * 3, dtype='int8')}) .....: In [347]: dft Out[347]: A B C D E F G (continues on next page) 2.3. Essential basic In [348]: dft.dtypes Out[348]: A float64 B int64 C object D datetime64[ns] E float32 F bool G int8 dtype: object On a Series object, use the dtype attribute. In [349]: dft['A'].dtype Out[349]: dtype('float64') 0 码力 | 3231 页 | 10.87 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 1.1.0[]]' IntervalIn- dex nullable inte- ger Int64Dtype, . . . (none) arrays. IntegerArray 'Int8', 'Int16', 'Int32', 'Int64', 'UInt8', 'UInt16', 'UInt32', 'UInt64' Nullable integer data type Strings pd.Series([1.0] * 3).astype('float32'), .....: 'F': False, .....: 'G': pd.Series([1] * 3, dtype='int8')}) .....: In [347]: dft Out[347]: A B C D E F G (continues on next page) 2.3. Essential basic In [348]: dft.dtypes Out[348]: A float64 B int64 C object D datetime64[ns] E float32 F bool G int8 dtype: object On a Series object, use the dtype attribute. In [349]: dft['A'].dtype Out[349]: dtype('float64') 0 码力 | 3229 页 | 10.87 MB | 1 年前3
pandas: powerful Python data analysis toolkit -1.0.3[]]' IntervalIn- dex nullable inte- ger Int64Dtype, . . . (none) arrays. IntegerArray 'Int8', 'Int16', 'Int32', 'Int64', 'UInt8', 'UInt16', 'UInt32', 'UInt64' Nullable integer data type Strings pd.Series([1.0] * 3).astype('float32'), .....: 'F': False, .....: 'G': pd.Series([1] * 3, dtype='int8')}) .....: In [334]: dft Out[334]: A B C D E F G 0 0.035962 1 foo 2001-01-02 1.0 False 1 1 0 In [335]: dft.dtypes Out[335]: A float64 B int64 C object D datetime64[ns] E float32 F bool G int8 dtype: object On a Series object, use the dtype attribute. In [336]: dft['A'].dtype Out[336]: dtype('float64') 0 码力 | 3071 页 | 10.10 MB | 1 年前3
pandas: powerful Python data analysis toolkit - 1.3.2freq>]]' IntervalIn- dex nul- lable inte- ger Int64Dtype, . . . (none) arrays. IntegerArray 'Int8', 'Int16', 'Int32', 'Int64', 'UInt8', 'UInt16', 'UInt32', 'UInt64' Nullable integer data type Strings pd.Series([1.0] * 3).astype("float32"), .....: "F": False, .....: "G": pd.Series([1] * 3, dtype="int8"), .....: } (continues on next page) 2.3. Essential basic functionality 249 pandas: powerful Python In [349]: dft.dtypes Out[349]: A float64 B int64 C object D datetime64[ns] E float32 F bool G int8 dtype: object On a Series object, use the dtype attribute. In [350]: dft["A"].dtype Out[350]: dtype('float64')0 码力 | 3509 页 | 14.01 MB | 1 年前3
共 32 条
- 1
- 2
- 3
- 4













