Apr-22-2018, 04:19 PM
Hello, I'm new to Python and I've been going through some online tutorials. While quite a few all go through how to read files, I find that none really explained well how to return a specific value, if that's the way to describe it.
Say I have an Excel File with such:
Name | Weight | Day
Tom | 150 | Monday
Tom | 149 | Tuesday
Tom | 148 | Wednesday
John | 150 | Monday
John | 151 | Tuesday
John | 152 | Wednesday
Kevin | 150 | Monday
Kevin | 148 | Tuesday
Kevin | 146 | Wednesday
I sort of have a basic understanding how to do the loc and iloc. But is there a way where I can "search" by Name and Day, to find out Weight? Like if I had it search Tom on Monday, what is his weight?
Say I have an Excel File with such:
Name | Weight | Day
Tom | 150 | Monday
Tom | 149 | Tuesday
Tom | 148 | Wednesday
John | 150 | Monday
John | 151 | Tuesday
John | 152 | Wednesday
Kevin | 150 | Monday
Kevin | 148 | Tuesday
Kevin | 146 | Wednesday
I sort of have a basic understanding how to do the loc and iloc. But is there a way where I can "search" by Name and Day, to find out Weight? Like if I had it search Tom on Monday, what is his weight?