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

Add pandas_dtype to LogicalType #85

Merged
merged 2 commits into from Sep 10, 2020
Merged

Add pandas_dtype to LogicalType #85

merged 2 commits into from Sep 10, 2020

Conversation

thehomebrewnerd
Copy link
Contributor

@thehomebrewnerd thehomebrewnerd commented Sep 10, 2020

This PR implements two changes in preparation for performing dataframe dtype conversions:

  • Adds pandas_dtype to each logical type, representing the string alias for the underlying dtype that should be associated with the LogicalType
  • Removes the dtype attribute from DataColumn and replaces it with a property that returns the dtype of the underlying series.

Closes #84

@codecov
Copy link

codecov bot commented Sep 10, 2020

Codecov Report

Merging #85 into main will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main      #85   +/-   ##
=======================================
  Coverage   99.13%   99.14%           
=======================================
  Files          12       12           
  Lines         578      582    +4     
=======================================
+ Hits          573      577    +4     
  Misses          5        5           
Impacted Files Coverage Δ
data_tables/data_column.py 100.00% <100.00%> (ø)
data_tables/logical_types.py 96.49% <100.00%> (+0.19%) ⬆️

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 3b99a47...6b33bdb. Read the comment docs.

@gsheni
Copy link
Contributor

gsheni commented Sep 10, 2020

@thehomebrewnerd Should we write some tests that verify these dtypes are properly set when we do the conversions? OR will that be in a follow-up MR?

@thehomebrewnerd
Copy link
Contributor Author

@thehomebrewnerd Should we write some tests that verify these dtypes are properly set when we do the conversions? OR will that be in a follow-up MR?

I think that should be in a follow up MR. As of now since there is no code to change the dtype, I don't think we can implement those tests. But, yes, I agree we should test that out for all these to make sure it works as expected once the conversion code is in place - we will confirm that the series dtype matches the type specified here.

@thehomebrewnerd thehomebrewnerd merged commit e4054df into main Sep 10, 2020
@thehomebrewnerd thehomebrewnerd deleted the add-dtypes branch September 10, 2020 16:18
@gsheni gsheni mentioned this pull request Sep 24, 2020
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.

Add _default_pandas_dtype to each Logical Type
2 participants