Skip to content

Commit

Permalink
bugfix erased name dtype in LuxSeries (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
dorisjlee committed Nov 28, 2020
1 parent b3e33fa commit 8149e72
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions lux/core/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class LuxSeries(pd.Series):
"_prev",
"_history",
"_saved_export",
"name",
]

@property
Expand Down
3 changes: 3 additions & 0 deletions tests/test_pandas_coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,7 @@ def test_df_to_series(global_var):
"_prev",
"_history",
"_saved_export",
"name",
], "Metadata is lost when going from Dataframe to Series."
assert df.cardinality is not None, "Metadata is lost when going from Dataframe to Series."
assert series.name == "Weight", "Pandas Series original `name` property not retained."
Expand Down Expand Up @@ -526,6 +527,7 @@ def test_value_counts(global_var):
"_prev",
"_history",
"_saved_export",
"name",
], "Metadata is lost when going from Dataframe to Series."
assert df.cardinality is not None, "Metadata is lost when going from Dataframe to Series."
assert series.name == "Weight", "Pandas Series original `name` property not retained."
Expand Down Expand Up @@ -555,6 +557,7 @@ def test_str_replace(global_var):
"_prev",
"_history",
"_saved_export",
"name",
], "Metadata is lost when going from Dataframe to Series."
assert df.cardinality is not None, "Metadata is lost when going from Dataframe to Series."
assert series.name == "Brand", "Pandas Series original `name` property not retained."
Expand Down

0 comments on commit 8149e72

Please sign in to comment.