Преглед на файлове

Adding missing columns to dataframe before entering it into inconsist table

ogert преди 5 години
родител
ревизия
c5ead5de89
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      cdplib/db_migration/MigrationCleaning.py

+ 1 - 1
cdplib/db_migration/MigrationCleaning.py

@@ -236,7 +236,7 @@ class MigrationCleaning:
             if len(columns) > 0:
                 columns_not_in_data = [column for column in columns if column not in data.columns]
                 for value in columns_not_in_data:
-                    df[value] = 'Column does not exist in the mongo database and has therefore been dropped'
+                    data_inconsist[value] = 'Column does not exist in the mongo database and has therefore been dropped'
                 data_inconsist = data_inconsist[columns]
 
         db.append_to_table(data=data_inconsist,