Skip to content

Fix deprecated pandas.append() calls #14

@iAmGiG

Description

@iAmGiG

Problem

Multiple files use deprecated DataFrame.append() which was removed in Pandas 2.0.

Affected files:

  • anomaly-detection/train_og.py:29
  • anomaly-detection/test.py:21, 40, 54
  • classification/train.py (if applicable)

Current pattern:

df_gafgyt = df_gafgyt.append(pd.read_csv(f), ignore_index=True)
scaler.fit(x_train.append(x_opt))

Fix:

df_gafgyt = pd.concat([df_gafgyt, pd.read_csv(f)], ignore_index=True)
# For scaler: fix data leakage first, then use pd.concat if still needed

Priority

MODERATE - Code won't run on Pandas 2.0+. Already addressed in archive branch via environment pinning, but needs fixing in main branch modernization.

Metadata

Metadata

Assignees

Labels

dependenciesDependency updates and compatibilityfederated-learningFederated learning related issuesmodernizationModernizing code, dependencies, and structure

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions