| [ Web Proxy ] |
| Viewing: https://dataframes.bigquery.dev/reference/api/bigframes.pandas.Index.from_frame.html | [Back] [Original] |
Section Navigation
Make a MultiIndex from a DataFrame.
Examples:
>>> df = bpd.DataFrame([['HI', 'Temp'], ['HI', 'Precip'],
... ['NJ', 'Temp'], ['NJ', 'Precip']],
... columns=['a', 'b'])
>>> df
a b
0 HI Temp
1 HI Precip
2 NJ Temp
3 NJ Precip
[4 rows x 2 columns]
>>> bpd.MultiIndex.from_frame(df)
Index([0, 1, 2, 3], dtype='Int64')
frame (Union[bigframes.pandas.Series, bigframes.pandas.DataFrame]) bigframes.pandas.Series or bigframes.pandas.DataFrame to convert to bigframes.pandas.Index.
The Index representation of the given Series or DataFrame.
bigframes.exceptions.NullIndexError If Index is Null.
Copyright 2019, Google.
Created using Sphinx 8.1.3.
Built with the PyData Sphinx Theme 0.19.0.
| Web Proxy Viewer | New URL | Original Page |