Skip to content


Python Errors & Solutions

python, numpy, pandas, e&s1 min read

Last updated : 08/August/2020

Events are in reverse chronological order.

Error : AttributeError: 'float' object has no attribute 'lower'

Error occurs in this line when trying to convert case to lower.

Why this error occured because NaNs are considered as float ? I got to find that by doing

Solution :

Error : ImportError: lxml not found, please install it

Installing in Jupyter

To know where its installed,

This error you get even after you have installed everything,

When you execute the below code,

Solution :

You have to Restart Kernel in Jupyter

Error : tuple indices must be integers or slices, not str

When looping dataframe trying to get a value from dataframe cell, got the error.

Solution :

Error : TypeError: unorderable types: > str()

Date : 17/April/2020

When executing the below line in pandas, got that error.


Update 1 : Updated like below, still got an error.

Solution :

Update 2 : df_temp[df_temp['ts'] > pd.to_datetime(dt_3d).date()]


Error : TypeError: 'tuple' object is not callable

Solution : This took some time to solve. I had used keyword range as a variable.

Solution is del range and then the loop worked.