Skip to content
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

DataFrame constructor converts uint64 series to object series #14881

Closed
hrichardlee opened this issue Dec 14, 2016 · 1 comment
Closed

DataFrame constructor converts uint64 series to object series #14881

hrichardlee opened this issue Dec 14, 2016 · 1 comment
Labels
Milestone

Comments

@hrichardlee
Copy link

@hrichardlee hrichardlee commented Dec 14, 2016

Code Sample, a copy-pastable example if possible

import pandas as pd
import numpy as np

uint64s = pd.Series([9710005220884355087, 9710005220138399309], dtype=np.dtype('uint64'))
uint64s.dtype  # dtype('uint64')

df = pd.DataFrame({'viadict': uint64s})
df['viacolumn'] = uint64s

df.info()
# Data columns (total 2 columns):
# viadict      2 non-null object
# viacolumn    2 non-null uint64

Problem description

It seems like these ways of adding columns to a dataframe should have the same behavior.

Expected Output

df.info()
# Data columns (total 2 columns):
# viadict      2 non-null uint64
# viacolumn    2 non-null uint64

(i.e. both columns are uint64s)

Output of pd.show_versions()

INSTALLED VERSIONS ------------------ commit: None python: 3.5.2.final.0 python-bits: 64 OS: Windows OS-release: 7 machine: AMD64 processor: Intel64 Family 6 Model 45 Stepping 7, GenuineIntel byteorder: little LC_ALL: None LANG: None pandas: 0.18.1 nose: 1.3.7 pip: 9.0.1 setuptools: 27.2.0 Cython: 0.25.1 numpy: 1.11.1 scipy: 0.18.0 statsmodels: 0.6.1 xarray: None IPython: 5.1.0 sphinx: 1.4.1 patsy: 0.4.1 dateutil: 2.5.3 pytz: 2016.6.1 blosc: None bottleneck: None tables: 3.2.2 numexpr: 2.6.1 matplotlib: 1.5.3 openpyxl: None xlrd: 1.0.0 xlwt: 1.1.2 xlsxwriter: 0.9.2 lxml: None bs4: 4.5.1 html5lib: None httplib2: None apiclient: None sqlalchemy: 1.0.13 pymysql: None psycopg2: None jinja2: 2.8 boto: 2.42.0 pandas_datareader: None
@chris-b1
Copy link
Contributor

@chris-b1 chris-b1 commented Dec 14, 2016

Yeah, uint64 support is generally spotty. PR to fix welcome!

xref #14721, xref #4471

@jreback jreback added this to the Next Major Release milestone Dec 14, 2016
gfyoung added a commit to forking-repos/pandas that referenced this issue Dec 19, 2016
The hack used to resolve pandas-devgh-2355 is no longer needed.
Removes the hack and patches several tests that relied
on this hacky (and buggy) behavior.

Closes pandas-devgh-14881.
gfyoung added a commit to forking-repos/pandas that referenced this issue Dec 19, 2016
The hack used to resolve pandas-devgh-2355 is no longer needed.
Removes the hack and patches several tests that relied
on this hacky (and buggy) behavior.

Closes pandas-devgh-14881.
gfyoung added a commit to forking-repos/pandas that referenced this issue Dec 19, 2016
The hack used to resolve pandas-devgh-2355 is no longer needed.
Removes the hack and patches several tests that relied
on this hacky (and buggy) behavior.

Closes pandas-devgh-14881.
@jreback jreback modified the milestones: 0.20.0, Next Major Release Dec 19, 2016
jreback added a commit that referenced this issue Dec 19, 2016
The hack used to resolve gh-2355 is no longer needed.
Removes the hack and patches several tests that relied
on this hacky (and buggy) behavior.

Closes gh-14881.
ShaharBental added a commit to ShaharBental/pandas that referenced this issue Dec 26, 2016
The hack used to resolve pandas-devgh-2355 is no longer needed.
Removes the hack and patches several tests that relied
on this hacky (and buggy) behavior.

Closes pandas-devgh-14881.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants
You can’t perform that action at this time.