Skip to content

Commit f65dcde

Browse files
committed
suppress pandas FutureWarning
1 parent 2d862ce commit f65dcde

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ how a consumer would use the library (e.g. adding unit tests, updating documenta
1010

1111
## 1.18.0 - 2023-11-30
1212

13-
### Added
13+
### Added
1414

1515
- Support for Python 3.12, includes various dependency version requirement updates.
1616

src/code42cli/output_formats.py

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import csv
22
import io
33
import json
4+
import warnings
45
from itertools import chain
56
from typing import Generator
67

@@ -16,6 +17,8 @@
1617
from code42cli.util import find_format_width
1718
from code42cli.util import format_to_table
1819

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

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

0 commit comments

Comments
 (0)