How do I filter data from a CSV file in Excel or with Ruby?
<p>I have a huge CSV file (over 57,000 rows and 50 columns) that I need to analyze. </p>

<p>Edit: Hi guys, thanks for your answers and comments, but I am still really confused about how to do this in Ruby, and I have no idea how to use MySQL. I will try to be more specific:</p>

<p>The CSV files: </p>

<p><a href="https://application.adadevelopersacademy.org/assets/2015_c20160810.csv-da99899293733c7536ba143cbe776239.gz" rel="nofollow">CSV on Storm Data Details for 2015</a></p>

<p><a href="https://application.adadevelopersacademy.org/assets/2000_c20160223.csv-efe96cf76f088697cd76b0820093f8c6.gz" rel="nofollow">CSV on Storm Data Details for 2000</a></p>

<p>The questions:
Prior to question start, for all answers, exclude all rows that have a County/Parish, Zone, or Marine name that begins with the letters A, B, or C. </p>

<ol>
<li>Find the month in 2015 where the State of Washington had the largest number of storm events. How many days of storm-free weather occurred in that month?</li>
<li>How many storms impacting trees happened between 8PM EST and 8AM EST in 2000?</li>
<li>In which year (2000 or 2015) did storms have a higher monetary impact within the boundaries of the 13 original colonies?</li>
</ol>

<p>The problems:</p>

<p>1) I was able to use filters in Excel to determine that the most "Thunderstorm Wind" events in Washington happened in July (6 entries), and there were 27 days of storm-free weather. However, when I tried to check my work in Spotfire, I got completely different results. (7 entries in May, and 28 days of storm-free weather in May. Excel only found two Thunderstorm Wind events in May.) Do you know what could be causing this discrepancy?</p>

<p>2) There are two columns where damage to trees might be mentioned: Event_Narrative and Episode_Narrative. Would it be possible to search both columns for "tree" and filter the spreadsheet down to only those results? Multiple-column filtering is apparently impossible in Excel. I would also need to find a way to omit the word "street" in the results (because it contains the word "tree"). </p>

<p>The method I came up with for the time range is to filter to only EST and AST results, then filter Begin_Time to 2000 to 2359 and 0 to 759 and repeat those ranges to filter End_Time. This appears to work.</p>

<p>3) I was able to filter the states to Delaware, Pennsylvania, New Jersey, Georgia, Connecticut, Massachusetts, Maryland, South Carolina, New Hampshire, Virginia, New York, North Carolina, and Rhode Island. It seems like a simple task to add all the values in Columns Y and Z (Damage_Property, Damage_Crops) and compare between the two years, but the values are written in the form "32.79K" and I cannot figure out how to make the adding equation work in that format or convert the values into integers. </p>

<p>Also, the question is asking for the original territory of the colonies, which is not the same as the territory those states now occupy. Do you know of a way to resolve this issue? Even if I had the time to look up each city listed, there does not seem to be a database of cities in the original 13 colonies online, and even if there was, the names of the cities may now be different. </p>

<hr>

<p>I am learning Ruby and some people have suggested that I try to use the Ruby CSV library to put the data into an array. I have looked at some tutorials that sort of describe how to do that, but I still don't understand how I would filter the data down to only what I need. </p>

<p>Can anyone help?</p>

<p>Thank you!</p>