Skip to content

Commit

Permalink
use select_dtype
Browse files Browse the repository at this point in the history
  • Loading branch information
gibsramen committed May 9, 2022
1 parent e76661a commit 309c644
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions evident/q2/_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ def _check_provided_univariate_data(sample_metadata, data_column):
"""Check if provided univariate data is valid."""
if data_column not in sample_metadata.columns:
raise ValueError(f"{data_column} not found in sample metadata.")
if sample_metadata[data_column].dtype.kind not in ["i", "f"]:
# i = integer, f = float
if data_column not in sample_metadata.select_dtypes("number"):
raise ValueError("Values in data_column must be numeric.")


Expand Down

0 comments on commit 309c644

Please sign in to comment.