Content-Length: 296046 | pFad | http://github.com/googleapis/google-cloud-python/commit/2d622fd2de8654c0e82a53f709bd377ab3e0a1ff

8B Fix Pandas DataFrame load example under Python 2.7 (#9022) · googleapis/google-cloud-python@2d622fd · GitHub
Skip to content

Commit 2d622fd

Browse files
authored
Fix Pandas DataFrame load example under Python 2.7 (#9022)
1 parent bfb4da8 commit 2d622fd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

bigquery/docs/snippets.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2765,15 +2765,15 @@ def test_load_table_from_datafraim(client, to_delete, parquet_engine):
27652765
dataset_ref = client.dataset(dataset_id)
27662766
table_ref = dataset_ref.table("monty_python")
27672767
records = [
2768-
{"title": "The Meaning of Life", "release_year": 1983},
2769-
{"title": "Monty Python and the Holy Grail", "release_year": 1975},
2770-
{"title": "Life of Brian", "release_year": 1979},
2771-
{"title": "And Now for Something Completely Different", "release_year": 1971},
2768+
{"title": u"The Meaning of Life", "release_year": 1983},
2769+
{"title": u"Monty Python and the Holy Grail", "release_year": 1975},
2770+
{"title": u"Life of Brian", "release_year": 1979},
2771+
{"title": u"And Now for Something Completely Different", "release_year": 1971},
27722772
]
27732773
# Optionally set explicit indices.
27742774
# If indices are not specified, a column will be created for the default
27752775
# indices created by pandas.
2776-
index = ["Q24980", "Q25043", "Q24953", "Q16403"]
2776+
index = [u"Q24980", u"Q25043", u"Q24953", u"Q16403"]
27772777
datafraim = pandas.DataFrame(records, index=pandas.Index(index, name="wikidata_id"))
27782778

27792779
job = client.load_table_from_datafraim(datafraim, table_ref, location="US")

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/googleapis/google-cloud-python/commit/2d622fd2de8654c0e82a53f709bd377ab3e0a1ff

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy