Ergebnisse in CSV und Excel speichern
Analysen zum Teilen exportieren
Ergebnisse in CSV und Excel speichern ist eine kostenlose Data Science Academy-Lektion auf CoddyKit. Dies ist Lektion 4 von 4. Du kannst die komplette Lektion unten kostenlos lesen – dann übst du sie direkt im Browser mit einem integrierten Code-Editor und einem KI-Tutor rund um die Uhr. Sie ist Teil des Data Science Academy-Lernpfads, und dein Fortschritt wird über Web und CoddyKit-App synchronisiert. Der Data Science Academy-Kurs umfasst insgesamt 4 Lektionen.
Teile dieser Lektion wurden noch nicht übersetzt und werden auf Englisch angezeigt.
Analysis Has to Travel
Your cleaned table is only useful if others can open it. The last step of most projects is writing results back out to a file. 📤
Write a CSV in One Line
Save any DataFrame to disk with to_csv. Pass a filename and pandas writes every row and column for you.
df.to_csv("clean_sales.csv")Drop the Extra Index
By default to_csv writes the row index as a first column. Pass index=False when that numbering is just noise.
df.to_csv("clean_sales.csv", index=False)Match the Reader's Locale
If colleagues open CSVs in European Excel, set sep to a semicolon so columns line up instead of cramming into one.
df.to_csv("out.csv", sep=";", index=False)Keep Text Safe
For names with accents or symbols, write with encoding="utf-8" so nothing turns into garbled characters on the other side.
df.to_csv("names.csv", encoding="utf-8")Save to Excel Too
Prefer a spreadsheet? to_excel writes an xlsx file, ready to open in Excel, Numbers, or Google Sheets.
df.to_excel("clean_sales.xlsx", index=False)Name the Sheet
The sheet_name option labels the tab inside your workbook, so the file is self-explanatory the moment it opens.
df.to_excel("report.xlsx",
sheet_name="Summary", index=False)Many Tables, One Workbook
Use an ExcelWriter to place several DataFrames on different tabs of a single shareable file.
with pd.ExcelWriter("book.xlsx") as w:
df1.to_excel(w, sheet_name="raw")
df2.to_excel(w, sheet_name="summary")Pick Just Some Columns
Export only what matters by passing columns with the list you want. The rest stay out of the saved file.
df.to_csv("slim.csv",
columns=["date", "total"], index=False)Round-Trip Friendly
A file you save with to_csv can be reopened later with read_csv, closing the loop from raw input to polished output.
Pick the Right Format
Choose CSV for size and portability, Excel for formatting and multiple sheets. Match the file to who opens it next.
Quick Check
You are exporting a CSV and do not want the row numbers saved. What do you set?
Recap: Ship Your Results
You can now export with to_csv and to_excel: drop the index, set separators and encoding, name sheets, and pick columns. The loop is complete. 🎉
Häufig gestellte Fragen
Ist die Lektion „Ergebnisse in CSV und Excel speichern“ kostenlos?
Ja — der vollständige Text von „Ergebnisse in CSV und Excel speichern“ ist hier im Web kostenlos zu lesen. Um sie interaktiv zu üben (integrierter Code-Editor und 24/7 KI-Tutor) und den Rest des Data Science Academy-Kurses freizuschalten, upgrade auf CoddyKit PRO. Der Data Science Academy-Kurs umfasst insgesamt 4 Lektionen.
Was lerne ich in „Ergebnisse in CSV und Excel speichern“?
Analysen zum Teilen exportieren Du übst Data Science Academy mit praktischem Code, den du direkt im Browser ausführst, und ein 24/7 KI-Tutor beantwortet deine Fragen während du die Lektion bearbeitest.
Brauche ich Erfahrung, um Data Science Academy zu starten?
Keine Vorkenntnisse erforderlich. Data Science Academy auf CoddyKit ist für Anfänger bis fortgeschrittene Lernende strukturiert, sodass du hier starten oder von Anfang an beginnen und in deinem eigenen Tempo voranschreiten kannst. Dies ist Lektion 4 von 4.
Wie lange dauert die Lektion „Ergebnisse in CSV und Excel speichern“?
Die meisten CoddyKit-Lektionen dauern etwa 5–10 Minuten. Jede ist kompakt und interaktiv, sodass du stetig Fortschritte machst und genau dort weitermachst, wo du aufgehört hast – im Web und in der App.
Kann ich in dieser Data Science Academy-Lektion Code schreiben und ausführen?
Ja. Jede Data Science Academy-Lektion enthält einen integrierten Code-Editor, sodass du echten Code direkt in deinem Browser schreibst und ausführst und sofort KI-Feedback erhältst — ohne lokale Einrichtung erforderlich.
Alle Lektionen in diesem Kurs
- read_csv und seine nützlichen Optionen
- Excel-Tabellen in pandas öffnen
- Beim Laden Datumsangaben parsen und dtypes setzen
- Ergebnisse in CSV und Excel speichern