<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Title
Step1:  Series 101
Series are one-dimensional arrays (like R's vectors)
Create a series of the number of floodingReports
Step2:  Note that the first column of numbers (0 to 4) are the index.
Set county names to be the index of the floodingReports series
Step3:  View the number of floodingReports in Cochise County
Step4:  View the counties with  more than 6 flooding reports
Step5:  Create a pandas series from a dictionary
Note
Step6:  Change the index of a series to shorter names
Step7:  DataFrame 101
DataFrames are like R's Dataframes
Create a dataframe from a dict of equal length lists or numpy arrays
Step8:  Set the order of the columns using the columns attribute
Step9:  Add a column
Step10:  Delete a column
Step11:  Transpose the dataframe
<ASSISTANT_TASK:>
Python Code:
import pandas as pd
Explanation: Title: pandas Data Structures
Slug: pandas_data_structures
Summary: pandas Data Structures
Date: 2016-05-01 12:00 
Category: Python
Tags: Data Wrangling
Authors: Chris Albon  
Import modules
End of explanation
floodingReports = pd.Series([5, 6, 2, 9, 12])
floodingReports
Explanation: Series 101
Series are one-dimensional arrays (like R's vectors)
Create a series of the number of floodingReports
End of explanation
floodingReports = pd.Series([5, 6, 2, 9, 12], index=['Cochise County', 'Pima County', 'Santa Cruz County', 'Maricopa County', 'Yuma County'])
floodingReports
Explanation: Note that the first column of numbers (0 to 4) are the index.
Set county names to be the index of the floodingReports series
End of explanation
floodingReports['Cochise County']
Explanation: View the number of floodingReports in Cochise County
End of explanation
floodingReports[floodingReports > 6]
Explanation: View the counties with  more than 6 flooding reports
End of explanation
# Create a dictionary
fireReports_dict = {'Cochise County': 12, 'Pima County': 342, 'Santa Cruz County': 13, 'Maricopa County': 42, 'Yuma County' : 52}
# Convert the dictionary into a pd.Series, and view it
fireReports = pd.Series(fireReports_dict); fireReports
Explanation: Create a pandas series from a dictionary
Note: when you do this, the dict's key's will become the series's index
End of explanation
fireReports.index = ["Cochice", "Pima", "Santa Cruz", "Maricopa", "Yuma"]
fireReports
Explanation: Change the index of a series to shorter names
End of explanation
data = {'county': ['Cochice', 'Pima', 'Santa Cruz', 'Maricopa', 'Yuma'], 
        'year': [2012, 2012, 2013, 2014, 2014], 
        'reports': [4, 24, 31, 2, 3]}
df = pd.DataFrame(data)
df
Explanation: DataFrame 101
DataFrames are like R's Dataframes
Create a dataframe from a dict of equal length lists or numpy arrays
End of explanation
dfColumnOrdered = pd.DataFrame(data, columns=['county', 'year', 'reports'])
dfColumnOrdered
Explanation: Set the order of the columns using the columns attribute
End of explanation
dfColumnOrdered['newsCoverage'] = pd.Series([42.3, 92.1, 12.2, 39.3, 30.2])
dfColumnOrdered
Explanation: Add a column
End of explanation
del dfColumnOrdered['newsCoverage']
dfColumnOrdered
Explanation: Delete a column
End of explanation
dfColumnOrdered.T
Explanation: Transpose the dataframe
End of explanation
<END_TASK>