bscheibel 5 years ago
parent
commit
f0abb96a3a
1 changed files with 2 additions and 2 deletions
  1. 2 2
      merge_pandas.py

+ 2 - 2
merge_pandas.py

@@ -1,5 +1,5 @@
 import pandas
 df = pandas.read_csv('text.csv', header = 0, delimiter=";")
-df['Total'] = df.groupby(['x','y'])['Text'].transform('sum')
+df['Text'] = df.groupby(['x','y'])['Text'].transform('sum')
 df.drop_duplicates()
-print(df)
+df.to_csv("merged.csv")