Skip to content

Commit edef48f

Browse files
authored
docs: (Series|Dataframe).dtypes (#598)
1 parent a43573d commit edef48f

File tree

2 files changed

+20
-6
lines changed

2 files changed

+20
-6
lines changed

third_party/bigframes_vendored/pandas/core/generic.py

+12
Original file line numberDiff line numberDiff line change
@@ -589,6 +589,18 @@ def dtypes(self):
589589
The result's index is the original DataFrame's columns. Columns
590590
with mixed types aren't supported yet in BigQuery DataFrames.
591591
592+
**Examples:**
593+
594+
>>> import bigframes.pandas as bpd
595+
>>> bpd.options.display.progress_bar = None
596+
597+
>>> df = bpd.DataFrame({'float': [1.0], 'int': [1], 'string': ['foo']})
598+
>>> df.dtypes
599+
float Float64
600+
int Int64
601+
string string[pyarrow]
602+
dtype: object
603+
592604
Returns:
593605
A *pandas* Series with the data type of each column.
594606
"""

third_party/bigframes_vendored/pandas/core/series.py

+8-6
Original file line numberDiff line numberDiff line change
@@ -119,13 +119,15 @@ def shape(self):
119119
def dtype(self):
120120
"""
121121
Return the dtype object of the underlying data.
122-
"""
123-
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)
124122
125-
@property
126-
def dtypes(self):
127-
"""
128-
Return the dtype object of the underlying data.
123+
**Examples:**
124+
125+
>>> import bigframes.pandas as bpd
126+
>>> bpd.options.display.progress_bar = None
127+
128+
>>> s = bpd.Series([1, 2, 3])
129+
>>> s.dtype
130+
Int64Dtype()
129131
"""
130132
raise NotImplementedError(constants.ABSTRACT_METHOD_ERROR_MESSAGE)
131133

0 commit comments

Comments
 (0)