modin.pandas.DataFrame.dtypes¶
- property DataFrame.dtypes: Series[source]¶
Return the dtypes in the
DataFrame
. This returns a Series with the data type of each column. The result’s index is the original DataFrame’s columns. Columns with mixed types are stored with theobject
dtype.The returned dtype for each label is the ‘largest’ numpy type for the underlying data.
For labels with integer-type data, int64 is returned.
For floating point and decimal data, float64 is returned.
For boolean data, numpy.bool is returned.
For datetime or timestamp data, datetime64[ns] is returned.
For all other data types, including string, date, binary or snowflake variants, the dtype object is returned.
This function is lazy and does NOT trigger evaluation of the underlying
DataFrame
.Note that because the returned dtype(s) may be of a larger type than the underlying data, the result of this function may differ from the dtypes of the output of the
to_pandas()
function. Callingto_pandas()
triggers materialization into a native pandas DataFrame. The dtypes of this materialized result are the narrowest type(s) that can represent the underlying data (like int16, or int32).- Returns:
Native pandas (not Snowpark pandas) Series with the dtype for each label.
- Return type:
Examples
>>> df = pd.DataFrame({'float': [1.0], ... 'int': [1], ... 'datetime': [pd.Timestamp('20180310')], ... 'string': ['foo']}) >>> df.dtypes float float64 int int64 datetime datetime64[ns] string object dtype: object