Python pandas import

Asked

Viewed 56 times

-1

I have this import and then set the columns I want. I can in the import itself set the columns I want?

import pandas as pd 

data=pd.read_csv("C:/Users/t714591/Videos/comissoes/95/96.txt",encoding='ISO-8859-1', sep=';')

data = data.iloc[:, [0, 1, 4, 5, 6]]

data.to_excel(r'C:/Users/t714591/Videos/comissoes/95/teste.xlsx', index = False)

1 answer

1

Browser other questions tagged

You are not signed in. Login or sign up in order to post.