mbakholdina / lib-tcpdump-processing

Library designed to process .pcap(ng) tcpdump or Wireshark trace files and extract SRT packets of interest for further analysis
15 stars 3 forks source link

Addressed FutureWarning with str.replace and regex=False #49

Closed mbakholdina closed 1 year ago

mbakholdina commented 1 year ago

This PR is addressing the following future warnings

/Users/msharabayko/projects/srt/lib-tcpdump-processing/tcpdump_processing/extract_packets.py:158: FutureWarning: The default value of regex will change from True to False in a future version.
  srt_packets['frame.time'] = srt_packets['frame.time'].str.replace('W. Europe Standard Time', 'CET')
/Users/msharabayko/projects/srt/lib-tcpdump-processing/tcpdump_processing/extract_packets.py:159: FutureWarning: The default value of regex will change from True to False in a future version.
  srt_packets['frame.time'] = srt_packets['frame.time'].str.replace('W. Europe Daylight Time', 'CEST')

that appeared after merging PR #47. regex argument of str.replace is meant to be False there, however, this is only true since version 2.0 of pandas.

float16 dtype is giving a KeyError when reading csv with pandas, that's why I changed it to float32.