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

Update dtype on DataColumn object instead of DataTable #233

Merged
merged 5 commits into from Oct 9, 2020

Conversation

thehomebrewnerd
Copy link
Contributor

Closes #170

Moves the _update_dtype method to the DataColumn object, so that instantiating a column directly will modify the series dtype as needed depending on the LogicalType.

Updated DataTable._update_columns method to make sure dataframe stays in sync with column series data since calling astype on a series returns a new series object.

Updated various test as a result of these changes and added new DataColumn tests to confirm physical types are changed as expected.

@codecov
Copy link

codecov bot commented Oct 9, 2020

Codecov Report

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

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #233   +/-   ##
=======================================
  Coverage   99.95%   99.95%           
=======================================
  Files          22       22           
  Lines        2301     2307    +6     
=======================================
+ Hits         2300     2306    +6     
  Misses          1        1           
Impacted Files Coverage Δ
woodwork/data_column.py 100.00% <100.00%> (ø)
woodwork/data_table.py 100.00% <100.00%> (ø)
woodwork/tests/data_column/test_data_column.py 100.00% <100.00%> (ø)

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 57fccfe...f0b6b99. Read the comment docs.

woodwork/data_table.py Show resolved Hide resolved
woodwork/data_table.py Show resolved Hide resolved
@thehomebrewnerd thehomebrewnerd merged commit f94b4fa into main Oct 9, 2020
@thehomebrewnerd thehomebrewnerd deleted the col-dtype branch October 9, 2020 16:31
@gsheni gsheni mentioned this pull request Oct 9, 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.

Support updating the underlying Series in DataColumn
2 participants