CSanity
CSanity

Reputation: 13

Csv Python reader

Hi I am trying to write a python code for reading NFL Stats I converted stats into a excel Csv file, I am wondering if anyone could help me plan out my code

Like how would I go about getting whos got the most touchdowns, sacks, passing yards, and etc.

I know this is kinda of beginner stuff but much help would be appreciated!

Upvotes: 0

Views: 154

Answers (2)

Jadder Moya
Jadder Moya

Reputation: 72

What I suggest is:

  1. Read the CVS file and set it in an array of two dimensions. Where columns are touchdowns, sacks, passing yards, etc. and rows are specific values for each player.

  2. To determinate for example which player got the most touchdown, go through the column 1 "column for touchdowns" and compare the maximum value of that column.

  3. To continue with the other stats you have to repeat the previous process with another column.

I hope this helps you.

Upvotes: 1

shrewmouse
shrewmouse

Reputation: 6050

Apparently it CSV week.

I just finished this answer and code: https://stackoverflow.com/a/53643728/2464381

And a working example: https://paiza.io/projects/e/35So9iUPfMdIORGzJTb2NQ

They will show you the process of importing a CSV file as a series of dictionaries.

That should give you a concrete example to start with.

Upvotes: 0

Related Questions