Jun-23-2020, 09:59 AM
(This post was last modified: Jun-23-2020, 10:00 AM by and2handles.)
Hey guys,
I am still a bloody beginner and struggeling with the conversion of excel data into a python list.
My code for getting the data is this:
The excel sheet has data from A:1 to D:4. My result for that data is:
Values Names x-axis y-axis
0 ..... 1 ..... a ..... 40.....31
1 ..... 2 ..... b ..... 50 .....32
2 ..... 3 ..... c ..... 60 ..... 33
3 ..... 4 ..... d ..... 70 ..... 34
What do I have to do that my data looks like this?
df = [[1,a,40,31],[2,b,50,21],...]
I am still a bloody beginner and struggeling with the conversion of excel data into a python list.
My code for getting the data is this:
import pandas as pd df = pd.read_excel('C:/Users/and2handles/Desktop/Temp/Python/testlist.xlsx', sheet_name="Tabelle1") print(df)
The excel sheet has data from A:1 to D:4. My result for that data is:
Values Names x-axis y-axis
0 ..... 1 ..... a ..... 40.....31
1 ..... 2 ..... b ..... 50 .....32
2 ..... 3 ..... c ..... 60 ..... 33
3 ..... 4 ..... d ..... 70 ..... 34
What do I have to do that my data looks like this?
df = [[1,a,40,31],[2,b,50,21],...]