-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Description
What happens?
When reading a JSON string contained in a Pandas DataFrame, I tried to set a column alias on the extracted data, but it was ignored. It works as expected when I specify the JSON string directly.
To Reproduce
# Python 3.7.15
import duckdb # 0.5.2.dev1278:
import pandas as pd # 1.3.5
df_test = pd.DataFrame([{'json_str': '{"hello":"world"}'}])
print(duckdb.connect().execute('''
select
json(json_str)->'hello' as MISSING
from
df_test
''').df())
# json(json_str) -> 'hello'
# 0 "world"
print(duckdb.connect().execute('''
select
json('{"hello":"world"}')->'hello' as FOUND
''').df())
# FOUND
# 0 "world"
OS:
Ubuntu 18.04.6 LTS
DuckDB Version:
0.5.1
DuckDB Client:
Python
Full Name:
Hiroyuki Sano
Affiliation:
University of Tsukuba
Have you tried this on the latest master
branch?
- I agree
Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?
- I agree
Metadata
Metadata
Assignees
Labels
No labels