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

dtype for DateType should be np.dtype("object"). #1447

Merged
merged 1 commit into from
Apr 24, 2020

Conversation

ueshin
Copy link
Collaborator

@ueshin ueshin commented Apr 24, 2020

dtype for DateType should be np.dtype("object").

>>> import pandas as pd
>>> import datetime
>>> pdf = pd.DataFrame({'dt': [datetime.date(2020,1,1),datetime.date(2020,1,2)], 'ts':[datetime.datetime(2020,1,1,0,0,0), datetime.datetime(2020,1,2,0,0,0)]})
>>> pdf.dtypes
dt            object
ts    datetime64[ns]
dtype: object

whereas:

>>> ks.from_pandas(pdf).dtypes
dt    datetime64[ns]
ts    datetime64[ns]
dtype: object

@ueshin ueshin requested a review from HyukjinKwon April 24, 2020 00:35
@codecov-io
Copy link

codecov-io commented Apr 24, 2020

Codecov Report

Merging #1447 into master will decrease coverage by 2.07%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1447      +/-   ##
==========================================
- Coverage   94.00%   91.93%   -2.08%     
==========================================
  Files          36       36              
  Lines        8342     8341       -1     
==========================================
- Hits         7842     7668     -174     
- Misses        500      673     +173     
Impacted Files Coverage Δ
databricks/koalas/typedef/typehints.py 81.08% <100.00%> (-0.17%) ⬇️
databricks/koalas/usage_logging/__init__.py 24.32% <0.00%> (-70.28%) ⬇️
databricks/koalas/usage_logging/usage_logger.py 50.00% <0.00%> (-50.00%) ⬇️
databricks/koalas/__init__.py 78.84% <0.00%> (-13.47%) ⬇️
databricks/conftest.py 88.67% <0.00%> (-7.55%) ⬇️
databricks/koalas/frame.py 92.54% <0.00%> (-3.02%) ⬇️
databricks/koalas/namespace.py 84.40% <0.00%> (-1.62%) ⬇️
databricks/koalas/plot.py 93.33% <0.00%> (-0.96%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7ea6739...86f5d65. Read the comment docs.

@HyukjinKwon HyukjinKwon merged commit 72bd8e6 into databricks:master Apr 24, 2020
@ueshin ueshin deleted the date_dtype branch April 24, 2020 01:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants