Skip to content

crash when calling DataFrame.from_records #27358

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

Closed
glyg opened this issue Jul 12, 2019 · 4 comments · Fixed by #27360
Closed

crash when calling DataFrame.from_records #27358

glyg opened this issue Jul 12, 2019 · 4 comments · Fixed by #27360
Labels
Reshaping Concat, Merge/Join, Stack/Unstack, Explode
Milestone

Comments

@glyg
Copy link
Contributor

glyg commented Jul 12, 2019

Code Sample, a copy-pastable example if possible

# each line of `data` is a list containing a single dict
data = pd.Series([[{"a": 1, "b": 2}], [{"a": 3, "b": 4}]])
crash = pd.DataFrame.from_records(data)

Problem description

The above code results in a crash of the jupyter kernel

Expected Output

crash should be a DataFrame

Output of pd.show_versions()

INSTALLED VERSIONS

commit: None
python: 3.7.3.final.0
python-bits: 64
OS: Linux
OS-release: 4.15.0-54-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: fr_FR.UTF-8
LOCALE: fr_FR.UTF-8

pandas: 0.24.2
pytest: 5.0.0
pip: 19.0.3
setuptools: 41.0.0
Cython: None
numpy: 1.16.4
scipy: None
pyarrow: None
xarray: None
IPython: 7.6.1
sphinx: None
patsy: None
dateutil: 2.8.0
pytz: 2019.1
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: 3.1.0
openpyxl: None
xlrd: 1.2.0
xlwt: None
xlsxwriter: None
lxml.etree: None
bs4: None
html5lib: None
sqlalchemy: 1.3.5
pymysql: None
psycopg2: None
jinja2: 2.10.1
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
gcsfs: None

@WillAyd
Copy link
Member

WillAyd commented Jul 12, 2019

Are you getting a traceback?

@jreback
Copy link
Contributor

jreback commented Jul 12, 2019

this is fine on master

@glyg
Copy link
Contributor Author

glyg commented Jul 12, 2019

no traceback, jupyter crashes (on various machines). If it's fine on master, I can close this (maybe you want me to add a test). In a IPython REPL with the same version of pandas, IPython segfaults

@glyg
Copy link
Contributor Author

glyg commented Jul 12, 2019

confirmed the crash doesn't happen in master and wrote test

@jreback jreback added the Reshaping Concat, Merge/Join, Stack/Unstack, Explode label Jul 12, 2019
@jreback jreback added this to the 0.25.0 milestone Jul 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Reshaping Concat, Merge/Join, Stack/Unstack, Explode
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants