| [ Web Proxy ] |
| Viewing: https://dataframes.bigquery.dev/reference/api/bigframes.bigquery.struct.html | [Back] [Original] |
Section Navigation
Takes a DataFrame and converts it into a Series of structs with each struct entry corresponding to a DataFrame row and each struct field corresponding to a DataFrame column
Examples:
>>> import bigframes.pandas as bpd >>> import bigframes.bigquery as bbq >>> import bigframes.series as series>>> srs = series.Series([{"version": 1, "project": "pandas"}, {"version": 2, "project": "numpy"},]) >>> df = srs.struct.explode() >>> bbq.struct(df) 0 {'version': 1, 'project': 'pandas'} 1 {'version': 2, 'project': 'numpy'} dtype: struct<version: int64, project: string>[pyarrow]
- Args:
- value (bigframes.dataframe.DataFrame):
The DataFrame to be converted to a Series of structs
- Returns:
bigframes.series.Series: A new Series with struct entries representing rows of the original DataFrame
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 |