Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 19024

Indexing a Python Dataframe

$
0
0

I am attempting to analyse high school attendance and behaviour data. I have a raw excel data sheet as shown in the image.enter image description here

I get lost with how to index it. Essentially the first three columns should be "Student Name, Class and Percent Attendance". Then all subsequent columns are a 2 level index, the first of which is "date" and the sub-index "period name".

How can I delete the appropriate rows and columns to achieve this and the index be correct. Many thanks

Graham

I don't really know what to try? Historically I have "hard-wired" what I want into a Python Array but I really want to become more proficient with dataframes and see this as a good project to have a go upon.


Viewing all articles
Browse latest Browse all 19024

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>