I'm trying to retrieve one row of data from my Dataframe created from a csv file accessed via URL.
URL = 'http://www.bom.gov.au/clim_data/cdio/tables/text/IDCJCM0033_091126.csv'
s = requests.get(URL).content
df1 = pd.read_csv(io.StringIO(s.decode('utf-8')), sep=',', escapechar='\\', skiprows=11)
I'm using...
df1['Statistic Element'].str.contains('Mean rainfall')
...to determine the row containing the data I require however python does not recognize the .str element of the dataframe?
The code works fine using a test dataframe so I'm wondering if there is a problem with the csv?
import reand passingflags=re.IGNORECASEtocontainsdf.info()