Repository navigation
Conversation
Codecov Report
@@ Coverage Diff @@
## main #165 +/- ##
=======================================
Coverage 99.83% 99.84%
=======================================
Files 20 20
Lines 1787 1880 +93
=======================================
+ Hits 1784 1877 +93
Misses 3 3
Continue to review full report at Codecov.
|
| raise KeyError(f"Column with name '{key}' not found in DataTable") | ||
| return self.columns[key] | ||
|
|
||
| def __setitem__(self, col_name, column): |
There was a problem hiding this comment.
We should be careful to keep the name of the DataColumn (which is just DataColumn.series.name) in sync with the name we are using for the column in the DataTable. I think by passing a different name here with col_name it is possible that the DataTable will use a name for the column that is different than series.name, which could be confusing if users inspect the underlying values.
Maybe we should just rename the DataColumn.series to match the value the user supplies for col_name to keep things in sync.
There was a problem hiding this comment.
Good point. I agree with matching to whatever col_name is.
Thoughts on warning the user if they supply a name in the series that doesnt match the col_name that they supplied? Not sure it'd be necessary since going with col_name seems more expected here, but thought I'd bring it up
There was a problem hiding this comment.
Seems appropriate to raise a warning if we rename the series to alert the user that this was done.
gsheni
left a comment
There was a problem hiding this comment.
looks good overall. Just 1 minor thing.
closes #120