Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on May 7, 2026. It is now read-only.

fix: blob.display() shows <NA> for null rows#2158

Merged
shuoweil merged 2 commits into
maingoogleapis/python-bigquery-dataframes:mainfrom
tswast-covergoogleapis/python-bigquery-dataframes:tswast-coverCopy head branch name to clipboard
Oct 14, 2025
Merged

fix: blob.display() shows <NA> for null rows#2158
shuoweil merged 2 commits into
maingoogleapis/python-bigquery-dataframes:mainfrom
tswast-covergoogleapis/python-bigquery-dataframes:tswast-coverCopy head branch name to clipboard

Conversation

@tswast

@tswast tswast commented Oct 9, 2025

Copy link
Copy Markdown
Contributor

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 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> 🦕

@tswast tswast requested review from a team and shuoweil October 9, 2025 18:57
@product-auto-label product-auto-label Bot added the size: s Pull request size is small. label Oct 9, 2025
@product-auto-label product-auto-label Bot added the api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. label Oct 9, 2025
@tswast tswast changed the title fix: blob.display() shows <NA> for null rows fix: blob.display() shows <NA> for null rows Oct 9, 2025
@shuoweil

Copy link
Copy Markdown
Contributor

Please check failed testcases. Thanks a lot.

@tswast

tswast commented Oct 10, 2025

Copy link
Copy Markdown
Contributor Author

Test failures:

FAILED tests/system/large/blob/test_function.py::test_blob_transcribe[gemini-2.0-flash-lite-001-False]

def test_blob_transcribe(
        audio_mm_df: bpd.DataFrame,
        model_name: str,
        verbose: bool,
    ):
        actual = (
            audio_mm_df["audio"]
            .blob.audio_transcribe(
                model_name=model_name,  # type: ignore
                verbose=verbose,
            )
            .to_pandas()
        )
    
        # check relative length
        expected_text = "Now, as all books not primarily intended as picture-books consist principally of types composed to form letterpress"
        expected_len = len(expected_text)
    
        actual_text = ""
        if verbose:
            actual_text = actual[0]["content"]
        else:
            actual_text = actual[0]
>       actual_len = len(actual_text)
E       TypeError: object of type 'NAType' has no len()

It appears this test is not robust to null values. I don't think the display() method was touched by this test.

@shuoweil

Copy link
Copy Markdown
Contributor

Test failures:

FAILED tests/system/large/blob/test_function.py::test_blob_transcribe[gemini-2.0-flash-lite-001-False]

def test_blob_transcribe(
        audio_mm_df: bpd.DataFrame,
        model_name: str,
        verbose: bool,
    ):
        actual = (
            audio_mm_df["audio"]
            .blob.audio_transcribe(
                model_name=model_name,  # type: ignore
                verbose=verbose,
            )
            .to_pandas()
        )
    
        # check relative length
        expected_text = "Now, as all books not primarily intended as picture-books consist principally of types composed to form letterpress"
        expected_len = len(expected_text)
    
        actual_text = ""
        if verbose:
            actual_text = actual[0]["content"]
        else:
            actual_text = actual[0]
>       actual_len = len(actual_text)
E       TypeError: object of type 'NAType' has no len()

It appears this test is not robust to null values. I don't think the display() method was touched by this test.

Test failures:

FAILED tests/system/large/blob/test_function.py::test_blob_transcribe[gemini-2.0-flash-lite-001-False]

def test_blob_transcribe(
        audio_mm_df: bpd.DataFrame,
        model_name: str,
        verbose: bool,
    ):
        actual = (
            audio_mm_df["audio"]
            .blob.audio_transcribe(
                model_name=model_name,  # type: ignore
                verbose=verbose,
            )
            .to_pandas()
        )
    
        # check relative length
        expected_text = "Now, as all books not primarily intended as picture-books consist principally of types composed to form letterpress"
        expected_len = len(expected_text)
    
        actual_text = ""
        if verbose:
            actual_text = actual[0]["content"]
        else:
            actual_text = actual[0]
>       actual_len = len(actual_text)
E       TypeError: object of type 'NAType' has no len()

It appears this test is not robust to null values. I don't think the display() method was touched by this test.

I would suggest we rebase main and try to run system tests again.

@tswast

tswast commented Oct 14, 2025

Copy link
Copy Markdown
Contributor Author

@shuoweil All tests are passing.

@shuoweil shuoweil merged commit ddb4df0 into main Oct 14, 2025
25 checks passed
@shuoweil shuoweil deleted the tswast-cover branch October 14, 2025 18:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. size: s Pull request size is small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.