Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Guarda datos de un DataFrame en formato CSV en Python.
import pandas as pd
# Definición diccionario:
diccionario = {'pares': [0, 2, 4, 6], 'impares': [1, 3, 5, 7]}
# Creación DataFrame:
df_numeros = pd.DataFrame(diccionario)
# Guarda datos en CSV:
df_numeros.to_csv('numeros.csv', header=False, index=False)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.