Advertisement
Fhernd

guardar-hoja-calculo.py

Jan 29th, 2018
912
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.25 KB | None | 0 0
  1. import pandas as pd
  2. import openpyxl
  3.  
  4. # Definición diccionario:
  5. diccionario = {'pares': [0, 2, 4, 6], 'impares': [1, 3, 5, 7]}
  6.  
  7. # Creación DataFrame:
  8. df_numeros = pd.DataFrame(diccionario)
  9.  
  10. # Guarda datos en XLSX:
  11. df_numeros.to_excel('numeros.xlsx')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement