** You can automate it with python, right? Nice to meet you, so I'll do my best Record Part 2 **
Used in record 1 (https://qiita.com/wellwell3176/items/8e9a31d1595cdde89498) I didn't understand "csv.dict reader" well, so I looked it up and found out somehow.
Or rather, I feel that there is a problem with the word dictionary format ... Searchability is bad ... Searchability is not bad ...?
As far as I investigated, it seems that the difference is whether the information written in the first line is treated as data or as a heading. I tried to make a ponchi-e because I can't understand anything unless I put it in the figure, but it should be in the figure below.
<Fig. 1: Difference between reader and dict reader>
If the first line of the CSV data contains a heading (such as "No." or "age") instead of the data, The dict reader seems to be easier to handle. You should be able to write "get the average value of the data in the 1st to 70th rows of the age column".
On the other hand, if you use reader for CSV with headings, you can say "Average value of data in rows 2 to 71 of the second column". It's hard because you have to always consider the two points of "what information is stored in what column?" And "the first row is not included in the data".
Roughly speaking, let's move on with this understanding.
It's not like making an independent article, but it's a memorandum, and I'll leave it for each theme.
Recommended Posts