0
#Importa a Biblioteca Pandas
import pandas as pd
print('=== original ===')
df = pd.read_excel('ABC.xlsx');
print(df)
print()
print('=== Modo 1 ===')
#Seta None no index e header(ou numero de inicio de leitura da linha)
df = pd.read_excel('ABC.xlsx', index_col=None, header=None);
print(df)
print()
print('=== Modo 2 ===')
#Seta None header(ou numero de inicio de leitura da linha)
df = pd.read_excel('ABC.xlsx', header=None, names=['Produto','Valor','Unidade']);
print(df)
print()
Use
header=None
in the call forpd.read_excel
, thus:data = pd.read_excel('numero_automoveis_vendidos.xlsx', header=None)
– Murgalha
You can add in the question an example of how the data is saved in file . xlsx? and how should the expected output be?
– Terry
I ran with header = None and it worked very well, thank you very much.
– Erick Santos