Skip to content

Allow newlines in data passed to to_gbq() #230

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

Merged
merged 2 commits into from
Oct 26, 2018

Conversation

cbandy
Copy link
Contributor

@cbandy cbandy commented Oct 24, 2018

Relates to #180.

I intended to include \r\n in the system test, but I found that something was stripping \r in the round trip:

>       assert result_df.iloc[2,0] == "ij\r\nkl"
E       AssertionError: assert 'ij\nkl' == 'ij\r\nkl'
E         - ij
E         + ij
E         ?   +
E           kl

The unit test shows, I think, that we're sending the values correctly, so I didn't investigate further.

Copy link

@stickler-ci stickler-ci bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The following files do not match the black styleguide:

  • tests/system/test_gbq.py
  • tests/unit/test_load.py

@max-sixty
Copy link
Contributor

This looks great, thanks @cbandy !

Would you mind formatting with black? We're using that for consistent formatting now. LMK if you need any guidance

@cbandy
Copy link
Contributor Author

cbandy commented Oct 24, 2018

@max-sixty fixed in amended commit! thanks.

Copy link
Collaborator

@tswast tswast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@tswast tswast merged commit 7c3dbaf into googleapis:master Oct 26, 2018
@cbandy cbandy deleted the to_gbq_newlines branch October 26, 2018 19:43
@max-sixty
Copy link
Contributor

Thanks @cbandy (and thanks @tswast for catching, I'm not sure why I missed that notification)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants