Skip to content

Commit

Permalink
test is_numeric
Browse files Browse the repository at this point in the history
  • Loading branch information
zdelrosario committed Jan 3, 2023
1 parent 9ab6956 commit 01c05a3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/test_dfply_select.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,16 @@ def test_select_if(self):
>> gr.tf_select_if(lambda col: any(col.str.contains(".")))
)
)
# test 6: is_numeric helper
self.assertEqual(
{"carat", "depth", "table", "price", "x", "y", "z"},
set(
(
data.df_diamonds
>> gr.tf_select_if(gr.is_numeric)
).columns
)
)

def test_drop_if(self):
# test 1: returns a dataframe where any column does not have a mean greater than 3
Expand Down

0 comments on commit 01c05a3

Please sign in to comment.