Skip to content

Commit 95bff3f

Browse files
authored
fix: use series's own session in series.reindex listlike case (#135)
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Make sure to open an issue as a [bug/issue](https://togithub.com/googleapis/python-bigquery-dataframes/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) Fixes #<issue_number_goes_here> 🦕
1 parent 386f35d commit 95bff3f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bigframes/series.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1242,7 +1242,9 @@ def reindex(self, index=None, *, validate: typing.Optional[bool] = None):
12421242
raise NotImplementedError(
12431243
"Cannot reindex with index with different nlevels"
12441244
)
1245-
new_indexer = bigframes.dataframe.DataFrame(index=index)[[]]
1245+
new_indexer = bigframes.dataframe.DataFrame(
1246+
index=index, session=self._get_block().expr._session
1247+
)[[]]
12461248
# multiindex join is senstive to index names, so we will set all these
12471249
result = new_indexer.rename_axis(range(new_indexer.index.nlevels)).join(
12481250
self.to_frame().rename_axis(range(self.index.nlevels)),

0 commit comments

Comments
 (0)