Skip to content

Commit

Permalink
Removed deprecated DataFrame.append(), use concat()
Browse files Browse the repository at this point in the history
https://pandas.pydata.org/docs/whatsnew/v2.0.0.html#removal-of-prior-version-deprecations-changes
Removed deprecated Series.append(), DataFrame.append(), use concat() instead (GH 35407)
  • Loading branch information
shu-tom committed Nov 13, 2023
1 parent 2e6746c commit 49f1015
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions logontracer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1959,11 +1959,11 @@ def parse_evtx(evtx_list, case):
event_series = pd.Series([eventid, hostname, username, logintype, status, authname, int(stime.timestamp())], index=event_set.columns)
ml_series = pd.Series([etime.strftime("%Y-%m-%d %H:%M:%S"), username, hostname, eventid], index=ml_frame.columns)
# append pandas series to dataframe
event_set = event_set.append(event_series, ignore_index=True)
ml_frame = ml_frame.append(ml_series, ignore_index=True)
event_set = pd.concat([event_set, event_series], ignore_index=True)
ml_frame = pd.concat([ml_frame, ml_series], ignore_index=True)
# print("%s,%i,%s,%s,%s,%s" % (eventid, ipaddress, username, comment, logintype))
count_series = pd.Series([stime.strftime("%Y-%m-%d %H:%M:%S"), eventid, username], index=count_set.columns)
count_set = count_set.append(count_series, ignore_index=True)
count_set = pd.concat([count_set, count_series], ignore_index=True)
# print("%s,%s" % (stime.strftime("%Y-%m-%d %H:%M:%S"), username))

if domain != "-":
Expand Down Expand Up @@ -2551,11 +2551,11 @@ def parse_es(case):
event_series = pd.Series([eventid, hostname, username, logintype, status, authname, int(stime.timestamp())], index=event_set.columns)
ml_series = pd.Series([etime.strftime("%Y-%m-%d %H:%M:%S"), username, hostname, eventid], index=ml_frame.columns)
# append pandas series to dataframe
event_set = event_set.append(event_series, ignore_index=True)
ml_frame = ml_frame.append(ml_series, ignore_index=True)
event_set = pd.concat([event_set, event_series], ignore_index=True)
ml_frame = pd.concat([ml_frame, ml_series], ignore_index=True)
# print("%s,%i,%s,%s,%s,%s" % (eventid, ipaddress, username, comment, logintype))
count_series = pd.Series([stime.strftime("%Y-%m-%d %H:%M:%S"), eventid, username], index=count_set.columns)
count_set = count_set.append(count_series, ignore_index=True)
count_set = pd.concat([count_set, count_series], ignore_index=True)
# print("%s,%s" % (stime.strftime("%Y-%m-%d %H:%M:%S"), username))

if domain != "-":
Expand Down

0 comments on commit 49f1015

Please sign in to comment.