Skip to content

Commit

Permalink
ignore errors when dropping columns (#111)
Browse files Browse the repository at this point in the history
* ignore errors when dropping columns
  • Loading branch information
jerpint authored Jun 26, 2023
1 parent e4d8b7a commit 6c956ff
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 6c956ff

Please sign in to comment.