-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Cannot create a DataFrame from list subclass #21226
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
Comments
It's not a too strict check in itself, but we have typed cython code that does this conversion of lists to array. And it is that code that expects an actual |
I mean, even if it is faster if just lists is provided to cython, it should still just work if it is a subclass, no? |
import pandas as pd a=lis() |
import pandas as pd a=lis() |
import pandas as pd a=lis() |
Made merge request: #21238 |
Code Sample, a copy-pastable example if possible
Problem description
It seems it is not possible to create a DataFrame from subclasses of lists. The code seems to have a too strict check.
Expected Output
It should create a DataFrame like it would with regular lists.
Output of
pd.show_versions()
INSTALLED VERSIONS
commit: None
python: 3.6.3.final.0
python-bits: 64
OS: Linux
OS-release: 4.13.0-41-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8
pandas: 0.22.0
pytest: 3.3.0
pip: 9.0.1
setuptools: 39.1.0
Cython: 0.28.2
numpy: 1.14.3
scipy: 1.0.0
pyarrow: 0.9.0
xarray: None
IPython: 6.2.1
sphinx: 1.7.4
patsy: 0.4.1
dateutil: 2.6.1
pytz: 2017.3
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: 2.1.0
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: 0.999999999
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.9.4
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
The text was updated successfully, but these errors were encountered: