forked from googleapis/python-bigquery-dataframes
-
Notifications
You must be signed in to change notification settings - Fork 0
[pull] main from googleapis:main #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
pull
wants to merge
1,739
commits into
ScorpiusDraconis83:main
Choose a base branch
from
googleapis:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Co-authored-by: Tim Sweña (Swast) <swast@google.com>
* feat: Add ai_generate_bool to the bigframes.bigquery package * fix stuffs * Fix format * fix doc format * fix format * fix code * expose ai module and rename the function * add ai module to doc * fix test * fix test * Update bigframes/bigquery/_operations/ai.py Co-authored-by: Tim Sweña (Swast) <swast@google.com> --------- Co-authored-by: Tim Sweña (Swast) <swast@google.com>
…tements (#2071) * fix: return a DataFrame containing query stats for all non-SELECT statements * return some results in SCRIPT if the last statement is a SELECT
* fix: deflake ai_gen_bool multimodel test * fix lint * fix doctest too * consolidates tests under system/small * fix doctest
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
* feat: support 'binary' for precision_score * add test * use unique(keep_order=False) to count unique items * use local variables to hold unique classes * use concat before checking unique labels * fix test
This change follows up on #2075 by splitting unary_compiler.py and its unit test file into smaller files.
* feat: support pandas series in ai.generate_bool * fix mypy error * define PROMPT_TYPE with Union * fix type * update test * update comment * fix mypy * fix return type * update doc * fix doctest
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
* fix: Transformers with non-standard column names through errors * fix
* refactor: add agg_ops.MinOp and MaxOp for sqlglot compiler * allow int timedelta to micro * address comments
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://github.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> 🦕
This PR fix the _get_anywidget_bundle method. Previously, when the underlying widget's _repr_mimebundle_ method returned a (data, metadata) tuple, the code was only extracting the data portion and discarding the metadata. This resulted in the widget not rendering correctly in environments like Colab, which rely on this metadata. The change corrects this by properly unpacking the tuple into widget_repr and widget_metadata. The method now preserves the metadata and returns it along with the data, ensuring that the necessary information for widget rendering is passed on. We also revert commit 4df3428 to reapply "refactor: Migrate DataFrame display to use IPython's repr_mimebundle() protocol for anywidget mode (#2271)" A testcase is added to verify this new change. We also verified at colab: screen/AzGa5RMTJnMH5NH Fixes #<466155761> 🦕
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://github.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> 🦕
This PR introduces the single column display for anywidget mode. A screenshot of single index column display is here: screen/6VLA4Nk68TsYczV Fixes #<459515995> 🦕
Added conventional-pre-commit hook for commit-msg stage. 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://github.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> 🦕 --------- Co-authored-by: Shenyang Cai <sycai@users.noreply.github.com>
Adds a new notebook, timeseries_analysis.ipynb, to provide a comprehensive walkthrough of time series forecasting with TimesFM and ARIMAPlus. The notebook covers data loading, preprocessing, model training, and visualization of results for both single and multiple time series. Fixes #<466169940> 🦕
This change aims to fix some string-related tests failing in #2248. Fixes internal issue 417774347🦕
This change aims to fix some string-related tests failing in #2248. Fixes internal issue 417774347 🦕
Updated `scripts/publish_api_coverage.py` to point documentation links to the new location at `https://dataframes.bigquery.dev/reference/api/`. The links are now generated as individual HTML pages for each method/attribute (e.g., `bigframes.pandas.DataFrame.T.html`) instead of anchors on a single page. Verified the changes by running `nox -r -s docs` and checking the generated HTML files. --- *PR created automatically by Jules for task [5838600072013437716](https://jules.google.com/task/5838600072013437716) started by @tswast* --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: Tim Sweña (Swast) <swast@google.com>
…n changes (#2342) 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://github.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 b/469510777 🦕
This change can resolve three doctests failures in #2248: - Added `to_json` support to the compiler backend. - Fixed minor bugs on AI ops - Fixed minor bugs on windows compiler Fixes internal issue 417774347 🦕
…ade (#2349) This change can fix the `test_get_formatted_time` to avoid the inconsistent results from the `humanize` package upgrade. Please refer to the internal screenshot for details: screenshot/BcJFk78xtYtLnyo
This PR focuses on improving the user interface and experience of the
BigFrames Anywidget table display by applying targeted styling and
adding interactive features.
Key changes include:
- **CSS Refinements:**
- Updated footer styling for better alignment and typography.
- Introduced styling for header content to allow horizontal resizing of
columns.
- Enhanced the visual presentation of error messages.
- Adjusted default cell padding and added hover styles for rows to
improve readability and visual feedback.
- **JavaScript Enhancements:**
- Implemented a row hover effect that highlights all cells belonging to
a logical row, even if it spans multiple physical table rows (e.g., due
to multi-indexing or exploded array data). This significantly improves
clarity when navigating complex tables.
- Added explicit handling for empty datasets to ensure correct
pagination button states and labels.
This PR aims to deliver a more polished and intuitive table display,
aligning with our coding style guides and enhancing user interaction.
Temporary patch for b/460861328 🦕
This change can resolve the `bigframes.ml.metrics.roc_auc_score` doctests failures in #2248. Fixes internal issue 417774347 🦕
) This change can resolve `read_gbq` doctests failures in #2248. Fixes internal issue 417774347🦕
Toward b/439708431 🦕
This PR refactors DataFrame.to_pandas_batches to return a
blocks.PandasBatches object, improving the handling of streamed data and
total row counts.
Additionally, this PR updates TableWidget to:
* Utilize the new PandasBatches return type for more robust data
loading.
* Improve thread safety during HTML updates using a re-entrant lock
(RLock), ensuring concurrent
interactions (like rapid sorting or pagination) are handled correctly
without race conditions.
* Fix compatibility with older Python versions by updating type
annotations.
* Refactor index handling logic within the widget for better clarity and
stability.
User Impact:
* More Stable Interactive Tables: Users experiencing the interactive
table widget in notebooks
should see more reliable updates when paging or sorting rapidly.
* Internal API Consistency: to_pandas_batches now provides a more
structured return type for
downstream consumers.
Fixes #<459515995> 🦕
…ull index (#2355) Fix ML fit ordering issue with partial mode and eval data. --- *PR created automatically by Jules for task [4750522966926378079](https://jules.google.com/task/4750522966926378079) started by @tswast* --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
This PR introduces interactive table displays for bigframes.Series
objects, aligning their notebook behavior with bigframes.DataFrame. Now,
when using the "anywidget" display mode, Series are rendered as
interactive tables, significantly improving data exploration.
Additionally, the standard text representation for a Series has been
enhanced to include the total row count, providing more context at a
glance.
User-Impactful Changes
* Interactive Series Display: When bigframes.options.display.repr_mode
is set to "anywidget", displaying a bigframes.Series in a notebook will
now render an interactive widget. The widget presents the Series as a
two-column table, showing the index and the values.
Example Usage:
```
import bigframes.pandas as bpd
# Enable interactive mode
bpd.options.display.repr_mode = "anywidget"
# Create or load a DataFrame
df = bpd.read_gbq(...)
series = df["my_column"]
# Displaying the series will now show an interactive table
series
```
* Enhanced Text Representation: The default text representation (e.g.,
when using print()) for a bigframes.Series now includes the total number
of rows at the end, similar to DataFrames. For example:
```
0 a
1 b
2 c
...
Name: my_column, Length: 10, dtype: string
[1000 rows]
```
These changes create a more consistent and intuitive user experience
between Series and DataFrames within notebook environments.
**Verified at:**
- vs code notebook: screen/6QWpRs5nuNESp6e
- colab notebook: screen/4SPpQXtHxk5bRpk
Fixes #<460860439> 🦕
---------
Co-authored-by: Chelsea Lin <chelsealin@google.com>
Co-authored-by: Shenyang Cai <sycai@users.noreply.github.com>
Updates `log_adapter` to optionally store API method names in a `Session` instance instead of the global list. This improves label accuracy when running tests in parallel. - Updates `Session` to initialize `_api_methods` list and lock. - Updates `log_adapter.add_api_method` and `get_and_reset_api_methods` to handle session-scoped logging. - Updates `log_adapter.method_logger` and `property_logger` to identify the session from arguments. - Propagates `session` through `start_query_with_client` and its callers to ensure labels are correctly associated with the session. --- *PR created automatically by Jules for task [6421369828766099756](https://jules.google.com/task/6421369828766099756) started by @tswast* --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: Tim Swena <swast@google.com>
This update refactors how the interactive DataFrame widget (anywidget mode) handles styling. It moves styling logic from Python code into dedicated CSS classes, making the display system cleaner and more robust. Fixes #<issue_number_goes_here> 🦕
Refactors the HTML table generation for DataFrames to use CSS classes instead of inline styles. * Switches from style="text-align: ..." to class="cell-align-...". * Uses class="bf-header-content" for header containers. * Standardizes null value styling with class="null-value". Fixes #<438181139> 🦕
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )