Oct-18-2017, 07:18 AM
Hi ,
While trying to restrict data set to UK cases only . I have applied the following code .
*************************************************************************
df1 = df1.loc[df1['Country'] == 'United Kingdom']
*************************************************************************
error :
AttributeError: 'list' object has no attribute 'loc'
Can anyone please suggest, why is this happening ?
While trying to restrict data set to UK cases only . I have applied the following code .
*************************************************************************
df1 = df1.loc[df1['Country'] == 'United Kingdom']
*************************************************************************
error :
AttributeError: 'list' object has no attribute 'loc'
Can anyone please suggest, why is this happening ?