0

I am trying to copy a column from an excel sheet into an array using pandas but am getting the following error:

read_excel() got an unexpected keyword argument 'sheetname'

Here is the code I am using:

df = pd.read_excel('Processed_Results_MO.xslx', sheetname='25%')

my_array = df['Methane Output (GJ/y)'].toarray()
1
  • 1
    It's supposed to be sheet_name Commented Sep 21, 2023 at 20:23

1 Answer 1

0

The parameter is called 'sheet_name' so your function would be

df = pd.read_excel('Processed_Results_MO.xslx', sheet_name='25%')
Sign up to request clarification or add additional context in comments.

1 Comment

This merits a vote-to-close as a typo, not an answer then, I think.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.