feat: support pandas series in ai.generate_bool#2086
Conversation
|
|
||
| if item.dtype == dtypes.OBJ_REF_DTYPE: | ||
| # Multi-model support | ||
| item = item.blob.read_url() |
There was a problem hiding this comment.
Can the pd.Series be converted into a series.Series represented for multi-model? I would suggest to have two IF branches: one for pd.Series and another one for. series.Series, for more readable.
There was a problem hiding this comment.
series conversions happens at the bottom of the function body at line 157
This if branch is just to grab the session from the first BigFrames session
| def _convert_series( | ||
| s: series.Series | pd.Series, session: session.Session | None | ||
| ) -> series.Series: | ||
| result = convert.to_bf_series(s, default_index=None, session=session) |
There was a problem hiding this comment.
when two series.Series have two different sessions, should we throw an error here?
There was a problem hiding this comment.
I would like to leave that check to the place where we "align" series:
python-bigquery-dataframes/bigframes/operations/base.py
Lines 210 to 212 in 090ce8e
b/443853093