Alles neu
This commit is contained in:
30
CSVImport.py
Normal file
30
CSVImport.py
Normal file
@@ -0,0 +1,30 @@
|
||||
import csv
|
||||
|
||||
#csv_datei = "Import.csv" # Name der CSV-Datei
|
||||
|
||||
# Konvertieren der LZ-Kopie zu CSV, CSV-Trenner ist das Semikolon
|
||||
# Datei einlesen und neue Datei schreiben
|
||||
with open('Import.csv', 'r', encoding='utf-8') as input_file, open('Import_neu.csv', 'w', encoding='utf-8',
|
||||
newline='') as output_file:
|
||||
reader = csv.reader(input_file, delimiter='\t') # Tab als Trennzeichen
|
||||
writer = csv.writer(output_file, delimiter=';') # Semikolon als Trennzeichen
|
||||
next(reader) # Kopfzeile auslassen
|
||||
|
||||
zeilen = list(reader)
|
||||
#print (len(zeilen))
|
||||
#for row in reader:
|
||||
for i in range(len(zeilen)):
|
||||
|
||||
alle Zeilen Spalte 1 durchgehen und schauen ob das in row Spalte 1 vorkommt
|
||||
wenn ja dann beide Spalten 2 kontrollieren. Wenn diese auch geleich sind, dann die Zeile nicht schreiben
|
||||
|
||||
|
||||
|
||||
print (i, " ", zeilen[i])
|
||||
# if row in zeilen[i]:
|
||||
# print(row)
|
||||
|
||||
|
||||
# for row in reader:
|
||||
# if len(row) >= 2: # Sicherstellen, dass es mindestens 2 Spalten gibt
|
||||
# writer.writerow([row[0], row[1]]) # Spalte 1 und 2 schreiben
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user