You need to learn how to debug small programs and solve problems on your own. Did you open my sample excel file? did you see what is on row 1 (cells A1:B1)? Did you try to print the df? Did you try to adapt the code to your needs?
Because you don't bother to provide enough information (like sample xlsx file) I created my own with headers x and y. So
you can access a column by name e.g.
Because you don't bother to provide enough information (like sample xlsx file) I created my own with headers x and y. So
'x'
and 'y'
are columnn names in the dataframe.you can access a column by name e.g.
df.x
or df['x']
. The former is not possible if name has space in it. In this case only df['some name']
works
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs