Skip to content

Commit 6aef153

Browse files
committed
suppress pandas FutureWarning
1 parent 2d862ce commit 6aef153

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/code42cli/output_formats.py

+6
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
from code42cli.util import find_format_width
1717
from code42cli.util import format_to_table
1818

19+
import warnings
20+
21+
# remove this once we drop support for Python 3.7
22+
warnings.filterwarnings("ignore", category=FutureWarning)
1923

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

0 commit comments

Comments
 (0)