Question: Q2 Structured Data: gropuby() 2 Points Consider the amazonFires.csv file shown below. amazonFires.csv year state month number date 2000 Maranhao Maro 6 2000-01-01 2002 Acre

Q2 Structured Data: gropuby() 2 Points Consider the amazonFires.csv file shown below. amazonFires.csv year state month number date 2000 Maranhao Maro 6 2000-01-01 2002 Acre Novembro 86 2002-01-01 2002 Alagoas Novembro 50 2002-01-01 2005 Acre Janeiro 12 2005-01-01 2008 Alagoas Fevereiro 74 2008-01-01 2002 Alagoas Novembro 50 2002-01-0 2005 Acre Janeiro 12 2005-01-0 2008 Alagoas Fevereiro 74 2008-01-0 and the following code: Luport pandas as pd Tires - pd. read cav('amazonFiresData.csv') Using groupby().write the code that would group the data by state and report the avera on the number column. Assign the result to a variable called statezavo IMPORTANT to get credit, type the instruction on a single line with no spaces. Use single quotes around column names Import libraries. Import pandas as pd Read in the csv file fires pd read cv(Acrefices.csv) +Group the data by state groupedData fires groupby(state) Print the average rainfall print(groupedDatalmazonfires mean()
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
