Skip to content

Commit

Permalink
Remove str conversions
Browse files Browse the repository at this point in the history
  • Loading branch information
lajohn4747 committed May 3, 2024
1 parent 8d617bd commit 8982a70
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions sdv/metadata/single_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -968,10 +968,9 @@ def validate(self):
+ '\n'.join([str(e) for e in errors])
)

def _validate_metadata_matches_data(self, data_columns):
def _validate_metadata_matches_data(self, columns):
errors = []
metadata_columns = self.columns or {}
columns = data_columns.astype(str)
missing_data_columns = set(columns).difference(metadata_columns)
if missing_data_columns:
errors.append(
Expand Down Expand Up @@ -1060,7 +1059,7 @@ def _validate_column_data(self, column, sdtype_warnings):
list:
A list containing any validation error messages found during the process.
"""
column_metadata = self.columns[str(column.name)]
column_metadata = self.columns[column.name]
sdtype = column_metadata['sdtype']
invalid_values = None

Expand Down

0 comments on commit 8982a70

Please sign in to comment.