Skip to content

Commit ead839e

Browse files
authored
Merge branch 'main' into routine-cleanup
2 parents d619add + dc46b3c commit ead839e

File tree

113 files changed

+2170
-2138
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+2170
-2138
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,4 @@ system_tests/local_test_setup
6262
# Make sure a generated file isn't accidentally committed.
6363
pylintrc
6464
pylintrc.test
65+
dummy.pkl

CHANGELOG.md

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,50 @@
44

55
[1]: https://pypi.org/project/bigframes/#history
66

7+
## [2.27.0](https://github.com/googleapis/python-bigquery-dataframes/compare/v2.26.0...v2.27.0) (2025-10-24)
8+
9+
10+
### Features
11+
12+
* Add __abs__ to dataframe ([#2186](https://github.com/googleapis/python-bigquery-dataframes/issues/2186)) ([c331dfe](https://github.com/googleapis/python-bigquery-dataframes/commit/c331dfed59174962fbdc8ace175dd00fcc3d5d50))
13+
* Add df.groupby().corr()/cov() support ([#2190](https://github.com/googleapis/python-bigquery-dataframes/issues/2190)) ([ccd7c07](https://github.com/googleapis/python-bigquery-dataframes/commit/ccd7c0774a65d09e6cf31d2b62d0bc64bd7c4248))
14+
* Add str accessor to index ([#2179](https://github.com/googleapis/python-bigquery-dataframes/issues/2179)) ([cd87ce0](https://github.com/googleapis/python-bigquery-dataframes/commit/cd87ce0d504747f44d1b5a55f869a2e0fca6df17))
15+
* Add support for `np.isnan` and `np.isfinite` ufuncs ([#2188](https://github.com/googleapis/python-bigquery-dataframes/issues/2188)) ([68723bc](https://github.com/googleapis/python-bigquery-dataframes/commit/68723bc1f08013e43a8b11752f908bf8fd6d51f5))
16+
* Include local data bytes in the dry run report when available ([#2185](https://github.com/googleapis/python-bigquery-dataframes/issues/2185)) ([ee2c40c](https://github.com/googleapis/python-bigquery-dataframes/commit/ee2c40c6789535e259fb6a9774831d6913d16212))
17+
* Support len() on Groupby objects ([#2183](https://github.com/googleapis/python-bigquery-dataframes/issues/2183)) ([4191821](https://github.com/googleapis/python-bigquery-dataframes/commit/4191821b0976281a96c8965336ef51f061b0c481))
18+
* Support pa.json_(pa.string()) in struct/list if available ([#2180](https://github.com/googleapis/python-bigquery-dataframes/issues/2180)) ([5ec3cc0](https://github.com/googleapis/python-bigquery-dataframes/commit/5ec3cc0298c7a6195d5bd12a08d996e7df57fc5f))
19+
20+
21+
### Documentation
22+
23+
* Update AI operators deprecation notice ([#2182](https://github.com/googleapis/python-bigquery-dataframes/issues/2182)) ([2c50310](https://github.com/googleapis/python-bigquery-dataframes/commit/2c503107e17c59232b14b0d7bc40c350bb087d6f))
24+
25+
## [2.26.0](https://github.com/googleapis/python-bigquery-dataframes/compare/v2.25.0...v2.26.0) (2025-10-17)
26+
27+
28+
### ⚠ BREAKING CHANGES
29+
30+
* turn Series.struct.dtypes into a property to match pandas (https://github.com/googleapis/python-bigquery-dataframes/pull/2169)
31+
32+
### Features
33+
34+
* Add df.sort_index(axis=1) ([#2173](https://github.com/googleapis/python-bigquery-dataframes/issues/2173)) ([ebf95e3](https://github.com/googleapis/python-bigquery-dataframes/commit/ebf95e3ef77822650f2e190df7b868011174d412))
35+
* Enhanced multimodal error handling with verbose mode for blob image functions ([#2024](https://github.com/googleapis/python-bigquery-dataframes/issues/2024)) ([f9e28fe](https://github.com/googleapis/python-bigquery-dataframes/commit/f9e28fe3f883cc4d486178fe241bc8b76473700f))
36+
* Implement cos, sin, and log operations for polars compiler ([#2170](https://github.com/googleapis/python-bigquery-dataframes/issues/2170)) ([5613e44](https://github.com/googleapis/python-bigquery-dataframes/commit/5613e4454f198691209ec28e58ce652104ac2de4))
37+
* Make `all` and `any` compatible with integer columns on Polars session ([#2154](https://github.com/googleapis/python-bigquery-dataframes/issues/2154)) ([6353d6e](https://github.com/googleapis/python-bigquery-dataframes/commit/6353d6ecad5139551ef68376c08f8749dd440014))
38+
39+
40+
### Bug Fixes
41+
42+
* `blob.display()` shows <NA> for null rows ([#2158](https://github.com/googleapis/python-bigquery-dataframes/issues/2158)) ([ddb4df0](https://github.com/googleapis/python-bigquery-dataframes/commit/ddb4df0dd991bef051e2a365c5cacf502803014d))
43+
* Turn Series.struct.dtypes into a property to match pandas (https://github.com/googleapis/python-bigquery-dataframes/pull/2169) ([62f7e9f](https://github.com/googleapis/python-bigquery-dataframes/commit/62f7e9f38f26b6eb549219a4cbf2c9b9023c9c35))
44+
45+
46+
### Documentation
47+
48+
* Clarify that only NULL values are handled by fillna/isna, not NaN ([#2176](https://github.com/googleapis/python-bigquery-dataframes/issues/2176)) ([8f27e73](https://github.com/googleapis/python-bigquery-dataframes/commit/8f27e737fc78a182238090025d09479fac90b326))
49+
* Remove import bigframes.pandas as bpd boilerplate from many samples ([#2147](https://github.com/googleapis/python-bigquery-dataframes/issues/2147)) ([1a01ab9](https://github.com/googleapis/python-bigquery-dataframes/commit/1a01ab97f103361f489f37b0af8c4b4d7806707c))
50+
751
## [2.25.0](https://github.com/googleapis/python-bigquery-dataframes/compare/v2.24.0...v2.25.0) (2025-10-13)
852

953

@@ -463,7 +507,7 @@
463507

464508
* Address `read_csv` with both `index_col` and `use_cols` behavior inconsistency with pandas ([#1785](https://github.com/googleapis/python-bigquery-dataframes/issues/1785)) ([ba7c313](https://github.com/googleapis/python-bigquery-dataframes/commit/ba7c313c8d308e3ff3f736b60978cb7a51715209))
465509
* Allow KMeans model init parameter as k-means++ alias ([#1790](https://github.com/googleapis/python-bigquery-dataframes/issues/1790)) ([0b59cf1](https://github.com/googleapis/python-bigquery-dataframes/commit/0b59cf1008613770fa1433c6da395e755c86fe22))
466-
* Replace function now can handle bpd.NA value. ([#1786](https://github.com/googleapis/python-bigquery-dataframes/issues/1786)) ([7269512](https://github.com/googleapis/python-bigquery-dataframes/commit/7269512a28eb42029447d5380c764353278a74e1))
510+
* Replace function now can handle pd.NA value. ([#1786](https://github.com/googleapis/python-bigquery-dataframes/issues/1786)) ([7269512](https://github.com/googleapis/python-bigquery-dataframes/commit/7269512a28eb42029447d5380c764353278a74e1))
467511

468512

469513
### Documentation

bigframes/bigquery/_operations/ai.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ def generate(
5353
5454
>>> import bigframes.pandas as bpd
5555
>>> import bigframes.bigquery as bbq
56-
>>> bpd.options.display.progress_bar = None
5756
>>> country = bpd.Series(["Japan", "Canada"])
5857
>>> bbq.ai.generate(("What's the capital city of ", country, " one word only"))
5958
0 {'result': 'Tokyo\\n', 'full_response': '{"cand...
@@ -155,7 +154,6 @@ def generate_bool(
155154
156155
>>> import bigframes.pandas as bpd
157156
>>> import bigframes.bigquery as bbq
158-
>>> bpd.options.display.progress_bar = None
159157
>>> df = bpd.DataFrame({
160158
... "col_1": ["apple", "bear", "pear"],
161159
... "col_2": ["fruit", "animal", "animal"]
@@ -240,7 +238,6 @@ def generate_int(
240238
241239
>>> import bigframes.pandas as bpd
242240
>>> import bigframes.bigquery as bbq
243-
>>> bpd.options.display.progress_bar = None
244241
>>> animal = bpd.Series(["Kangaroo", "Rabbit", "Spider"])
245242
>>> bbq.ai.generate_int(("How many legs does a ", animal, " have?"))
246243
0 {'result': 2, 'full_response': '{"candidates":...
@@ -322,7 +319,6 @@ def generate_double(
322319
323320
>>> import bigframes.pandas as bpd
324321
>>> import bigframes.bigquery as bbq
325-
>>> bpd.options.display.progress_bar = None
326322
>>> animal = bpd.Series(["Kangaroo", "Rabbit", "Spider"])
327323
>>> bbq.ai.generate_double(("How many legs does a ", animal, " have?"))
328324
0 {'result': 2.0, 'full_response': '{"candidates...
@@ -402,7 +398,6 @@ def if_(
402398
403399
>>> import bigframes.pandas as bpd
404400
>>> import bigframes.bigquery as bbq
405-
>>> bpd.options.display.progress_bar = None
406401
>>> us_state = bpd.Series(["Massachusetts", "Illinois", "Hawaii"])
407402
>>> bbq.ai.if_((us_state, " has a city called Springfield"))
408403
0 True
@@ -459,7 +454,6 @@ def classify(
459454
460455
>>> import bigframes.pandas as bpd
461456
>>> import bigframes.bigquery as bbq
462-
>>> bpd.options.display.progress_bar = None
463457
>>> df = bpd.DataFrame({'creature': ['Cat', 'Salmon']})
464458
>>> df['type'] = bbq.ai.classify(df['creature'], ['Mammal', 'Fish'])
465459
>>> df
@@ -517,7 +511,6 @@ def score(
517511
518512
>>> import bigframes.pandas as bpd
519513
>>> import bigframes.bigquery as bbq
520-
>>> bpd.options.display.progress_bar = None
521514
>>> animal = bpd.Series(["Tiger", "Rabbit", "Blue Whale"])
522515
>>> bbq.ai.score(("Rank the relative weights of ", animal, " on the scale from 1 to 3")) # doctest: +SKIP
523516
0 2.0

bigframes/bigquery/_operations/approx_agg.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ def approx_top_count(
4040
4141
>>> import bigframes.pandas as bpd
4242
>>> import bigframes.bigquery as bbq
43-
>>> bpd.options.display.progress_bar = None
4443
>>> s = bpd.Series(["apple", "apple", "pear", "pear", "pear", "banana"])
4544
>>> bbq.approx_top_count(s, number=2)
4645
[{'value': 'pear', 'count': 3}, {'value': 'apple', 'count': 2}]

bigframes/bigquery/_operations/array.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ def array_length(series: series.Series) -> series.Series:
4040
4141
>>> import bigframes.pandas as bpd
4242
>>> import bigframes.bigquery as bbq
43-
>>> bpd.options.display.progress_bar = None
4443
4544
>>> s = bpd.Series([[1, 2, 8, 3], [], [3, 4]])
4645
>>> bbq.array_length(s)
@@ -78,8 +77,6 @@ def array_agg(
7877
7978
>>> import bigframes.pandas as bpd
8079
>>> import bigframes.bigquery as bbq
81-
>>> import numpy as np
82-
>>> bpd.options.display.progress_bar = None
8380
8481
For a SeriesGroupBy object:
8582
@@ -128,8 +125,6 @@ def array_to_string(series: series.Series, delimiter: str) -> series.Series:
128125
129126
>>> import bigframes.pandas as bpd
130127
>>> import bigframes.bigquery as bbq
131-
>>> import numpy as np
132-
>>> bpd.options.display.progress_bar = None
133128
134129
>>> s = bpd.Series([["H", "i", "!"], ["Hello", "World"], np.nan, [], ["Hi"]])
135130
>>> bbq.array_to_string(s, delimiter=", ")

bigframes/bigquery/_operations/datetime.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,8 @@ def unix_seconds(input: series.Series) -> series.Series:
2121
2222
**Examples:**
2323
24-
>>> import pandas as pd
2524
>>> import bigframes.pandas as bpd
2625
>>> import bigframes.bigquery as bbq
27-
>>> bpd.options.display.progress_bar = None
2826
2927
>>> s = bpd.Series([pd.Timestamp("1970-01-02", tz="UTC"), pd.Timestamp("1970-01-03", tz="UTC")])
3028
>>> bbq.unix_seconds(s)
@@ -48,10 +46,8 @@ def unix_millis(input: series.Series) -> series.Series:
4846
4947
**Examples:**
5048
51-
>>> import pandas as pd
5249
>>> import bigframes.pandas as bpd
5350
>>> import bigframes.bigquery as bbq
54-
>>> bpd.options.display.progress_bar = None
5551
5652
>>> s = bpd.Series([pd.Timestamp("1970-01-02", tz="UTC"), pd.Timestamp("1970-01-03", tz="UTC")])
5753
>>> bbq.unix_millis(s)
@@ -75,10 +71,8 @@ def unix_micros(input: series.Series) -> series.Series:
7571
7672
**Examples:**
7773
78-
>>> import pandas as pd
7974
>>> import bigframes.pandas as bpd
8075
>>> import bigframes.bigquery as bbq
81-
>>> bpd.options.display.progress_bar = None
8276
8377
>>> s = bpd.Series([pd.Timestamp("1970-01-02", tz="UTC"), pd.Timestamp("1970-01-03", tz="UTC")])
8478
>>> bbq.unix_micros(s)

bigframes/bigquery/_operations/geo.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ def st_area(
5353
>>> import bigframes.pandas as bpd
5454
>>> import bigframes.bigquery as bbq
5555
>>> from shapely.geometry import Polygon, LineString, Point
56-
>>> bpd.options.display.progress_bar = None
5756
5857
>>> series = bigframes.geopandas.GeoSeries(
5958
... [
@@ -125,7 +124,6 @@ def st_buffer(
125124
>>> import bigframes.pandas as bpd
126125
>>> import bigframes.bigquery as bbq
127126
>>> from shapely.geometry import Point
128-
>>> bpd.options.display.progress_bar = None
129127
130128
>>> series = bigframes.geopandas.GeoSeries(
131129
... [
@@ -195,7 +193,6 @@ def st_centroid(
195193
>>> import bigframes.pandas as bpd
196194
>>> import bigframes.bigquery as bbq
197195
>>> from shapely.geometry import Polygon, LineString, Point
198-
>>> bpd.options.display.progress_bar = None
199196
200197
>>> series = bigframes.geopandas.GeoSeries(
201198
... [
@@ -250,7 +247,6 @@ def st_convexhull(
250247
>>> import bigframes.pandas as bpd
251248
>>> import bigframes.bigquery as bbq
252249
>>> from shapely.geometry import Polygon, LineString, Point
253-
>>> bpd.options.display.progress_bar = None
254250
255251
>>> series = bigframes.geopandas.GeoSeries(
256252
... [
@@ -312,7 +308,6 @@ def st_difference(
312308
>>> import bigframes.bigquery as bbq
313309
>>> import bigframes.geopandas
314310
>>> from shapely.geometry import Polygon, LineString, Point
315-
>>> bpd.options.display.progress_bar = None
316311
317312
We can check two GeoSeries against each other, row by row:
318313
@@ -407,7 +402,6 @@ def st_distance(
407402
>>> import bigframes.bigquery as bbq
408403
>>> import bigframes.geopandas
409404
>>> from shapely.geometry import Polygon, LineString, Point
410-
>>> bpd.options.display.progress_bar = None
411405
412406
We can check two GeoSeries against each other, row by row.
413407
@@ -489,7 +483,6 @@ def st_intersection(
489483
>>> import bigframes.bigquery as bbq
490484
>>> import bigframes.geopandas
491485
>>> from shapely.geometry import Polygon, LineString, Point
492-
>>> bpd.options.display.progress_bar = None
493486
494487
We can check two GeoSeries against each other, row by row.
495488
@@ -583,7 +576,6 @@ def st_isclosed(
583576
>>> import bigframes.bigquery as bbq
584577
585578
>>> from shapely.geometry import Point, LineString, Polygon
586-
>>> bpd.options.display.progress_bar = None
587579
588580
>>> series = bigframes.geopandas.GeoSeries(
589581
... [
@@ -650,7 +642,6 @@ def st_length(
650642
>>> import bigframes.bigquery as bbq
651643
652644
>>> from shapely.geometry import Polygon, LineString, Point, GeometryCollection
653-
>>> bpd.options.display.progress_bar = None
654645
655646
>>> series = bigframes.geopandas.GeoSeries(
656647
... [

bigframes/bigquery/_operations/json.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ def json_set(
4949
5050
>>> import bigframes.pandas as bpd
5151
>>> import bigframes.bigquery as bbq
52-
>>> import numpy as np
53-
>>> bpd.options.display.progress_bar = None
5452
5553
>>> s = bpd.read_gbq("SELECT JSON '{\\\"a\\\": 1}' AS data")["data"]
5654
>>> bbq.json_set(s, json_path_value_pairs=[("$.a", 100), ("$.b", "hi")])
@@ -101,7 +99,6 @@ def json_extract(
10199
102100
>>> import bigframes.pandas as bpd
103101
>>> import bigframes.bigquery as bbq
104-
>>> bpd.options.display.progress_bar = None
105102
106103
>>> s = bpd.Series(['{"class": {"students": [{"id": 5}, {"id": 12}]}}'])
107104
>>> bbq.json_extract(s, json_path="$.class")
@@ -141,7 +138,6 @@ def json_extract_array(
141138
142139
>>> import bigframes.pandas as bpd
143140
>>> import bigframes.bigquery as bbq
144-
>>> bpd.options.display.progress_bar = None
145141
146142
>>> s = bpd.Series(['[1, 2, 3]', '[4, 5]'])
147143
>>> bbq.json_extract_array(s)
@@ -204,7 +200,6 @@ def json_extract_string_array(
204200
205201
>>> import bigframes.pandas as bpd
206202
>>> import bigframes.bigquery as bbq
207-
>>> bpd.options.display.progress_bar = None
208203
209204
>>> s = bpd.Series(['[1, 2, 3]', '[4, 5]'])
210205
>>> bbq.json_extract_string_array(s)
@@ -272,7 +267,6 @@ def json_query(
272267
273268
>>> import bigframes.pandas as bpd
274269
>>> import bigframes.bigquery as bbq
275-
>>> bpd.options.display.progress_bar = None
276270
277271
>>> s = bpd.Series(['{"class": {"students": [{"id": 5}, {"id": 12}]}}'])
278272
>>> bbq.json_query(s, json_path="$.class")
@@ -303,7 +297,6 @@ def json_query_array(
303297
304298
>>> import bigframes.pandas as bpd
305299
>>> import bigframes.bigquery as bbq
306-
>>> bpd.options.display.progress_bar = None
307300
308301
>>> s = bpd.Series(['[1, 2, 3]', '[4, 5]'])
309302
>>> bbq.json_query_array(s)
@@ -355,7 +348,6 @@ def json_value(
355348
356349
>>> import bigframes.pandas as bpd
357350
>>> import bigframes.bigquery as bbq
358-
>>> bpd.options.display.progress_bar = None
359351
360352
>>> s = bpd.Series(['{"name": "Jakob", "age": "6"}', '{"name": "Jakob", "age": []}'])
361353
>>> bbq.json_value(s, json_path="$.age")
@@ -392,7 +384,6 @@ def json_value_array(
392384
393385
>>> import bigframes.pandas as bpd
394386
>>> import bigframes.bigquery as bbq
395-
>>> bpd.options.display.progress_bar = None
396387
397388
>>> s = bpd.Series(['[1, 2, 3]', '[4, 5]'])
398389
>>> bbq.json_value_array(s)
@@ -439,7 +430,6 @@ def to_json(
439430
440431
>>> import bigframes.pandas as bpd
441432
>>> import bigframes.bigquery as bbq
442-
>>> bpd.options.display.progress_bar = None
443433
444434
>>> s = bpd.Series([1, 2, 3])
445435
>>> bbq.to_json(s)
@@ -473,7 +463,6 @@ def to_json_string(
473463
474464
>>> import bigframes.pandas as bpd
475465
>>> import bigframes.bigquery as bbq
476-
>>> bpd.options.display.progress_bar = None
477466
478467
>>> s = bpd.Series([1, 2, 3])
479468
>>> bbq.to_json_string(s)
@@ -512,7 +501,6 @@ def parse_json(
512501
513502
>>> import bigframes.pandas as bpd
514503
>>> import bigframes.bigquery as bbq
515-
>>> bpd.options.display.progress_bar = None
516504
517505
>>> s = bpd.Series(['{"class": {"students": [{"id": 5}, {"id": 12}]}}'])
518506
>>> s

bigframes/bigquery/_operations/search.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ def vector_search(
111111
112112
>>> import bigframes.pandas as bpd
113113
>>> import bigframes.bigquery as bbq
114-
>>> bpd.options.display.progress_bar = None
115114
116115
DataFrame embeddings for which to find nearest neighbors. The ``ARRAY<FLOAT64>`` column
117116
is used as the search query:

bigframes/bigquery/_operations/sql.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ def sql_scalar(
3636
3737
>>> import bigframes.pandas as bpd
3838
>>> import bigframes.bigquery as bbq
39-
>>> import pandas as pd
40-
>>> import pyarrow as pa
41-
>>> bpd.options.display.progress_bar = None
4239
4340
>>> s = bpd.Series(["1.5", "2.5", "3.5"])
4441
>>> s = s.astype(pd.ArrowDtype(pa.decimal128(38, 9)))

0 commit comments

Comments
 (0)