Skip to content

Commit

Permalink
ignore errors when dropping columns
Browse files Browse the repository at this point in the history
  • Loading branch information
jerpint committed Jun 26, 2023
1 parent e4d8b7a commit a7661fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion buster/completers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def to_json(self, columns_to_ignore: Optional[list[str]] = None) -> Any:

def encode_df(df: pd.DataFrame) -> dict:
if columns_to_ignore is not None:
df = df.drop(columns=columns_to_ignore)
df = df.drop(columns=columns_to_ignore, errors='ignore')
return df.to_json(orient="index")

custom_encoder = {
Expand Down

0 comments on commit a7661fd

Please sign in to comment.