Skip to content

Commit 8fbbb83

Browse files
GarrettWushuoweil
authored andcommitted
chore: fix experimental blob operations json string values (#1299)
1 parent 45c1b82 commit 8fbbb83

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

bigframes/operations/blob.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,6 @@ def display(self, n: int = 3, *, content_type: str = ""):
156156
n (int, default 3): number of sample blob objects to display.
157157
content_type (str, default ""): content type of the blob. If unset, use the blob metadata of the storage. Possible values are "image", "audio" and "video".
158158
"""
159-
import bigframes.bigquery as bbq
160-
161159
# col name doesn't matter here. Rename to avoid column name conflicts
162160
df = bigframes.series.Series(self._block).rename("blob_col").head(n).to_frame()
163161

@@ -187,11 +185,7 @@ def display_single_url(read_url: str, content_type: str):
187185
ipy_display.display(response.content, raw=True)
188186

189187
for _, row in df.iterrows():
190-
# both are JSON-formated strings
191-
read_url = str(row["read_url"]).strip('"')
192-
content_type = str(row["content_type"]).strip('"')
193-
194-
display_single_url(read_url, content_type)
188+
display_single_url(row["read_url"], row["content_type"])
195189

196190
def image_blur(
197191
self,

0 commit comments

Comments
 (0)