0

I am reading an excel file using pandas with Jupyter . This is my data: enter image description here

I want to select the columns 350, 351, 352 as data as opposed to headers, how can I achieve this?

Umar.H
  • 22,559
  • 7
  • 39
  • 74
Jack21
  • 29
  • 8
  • 1
    Sorry I don't quite follow. By select them do you mean how to read only the first 3 columns? or how to select columns 350,351 and 352? Not sure what *How could I choose 350 351 and so on* means either – anky Mar 11 '21 at 15:24
  • `df[[350, 351, 352]]`? – It_is_Chris Mar 11 '21 at 15:25
  • It is my fault. I wanna choose data 351,352.... These numbers stand for data but they are shown as titles. – Jack21 Mar 11 '21 at 15:25
  • My first excel row contains numbers from 351 to 2500. By using Jupyter they are shown as titles. I want to select all these numbers as one row – Jack21 Mar 11 '21 at 15:27
  • 3
    ah I get it, `pd.read_excel(file.xslx, header=None)` should do the trick. – Umar.H Mar 11 '21 at 15:27
  • Thanks a lot @Manakin it actually worked. – Jack21 Mar 11 '21 at 15:29

1 Answers1

0

Add header=None to your call to pd.read_excel

qmeeus
  • 2,341
  • 2
  • 12
  • 21