Skip to content

Commit

Permalink
suppress pandas FutureWarning
Browse files Browse the repository at this point in the history
  • Loading branch information
tora-kozic committed Nov 30, 2023
1 parent 2d862ce commit 6aef153
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/code42cli/output_formats.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
from code42cli.util import find_format_width
from code42cli.util import format_to_table

import warnings

# remove this once we drop support for Python 3.7
warnings.filterwarnings("ignore", category=FutureWarning)

CEF_DEFAULT_PRODUCT_NAME = "Advanced Exfiltration Detection"
CEF_DEFAULT_SEVERITY_LEVEL = "5"
Expand Down Expand Up @@ -90,6 +94,8 @@ def _iter_table(self, dfs, columns=None, **kwargs):
if df.empty:
return
# convert everything to strings so we can left-justify format
# applymap() is deprecated in favor of map() for pandas 2.0+ (method renamed)
# pandas only supports Python 3.8+, update this once we drop support for Python 3.7
df = df.fillna("").applymap(str)
# set overrideable default kwargs
kwargs = {
Expand Down

0 comments on commit 6aef153

Please sign in to comment.