I have a dataset of (1460, 76)
size. It's currently in pandas Dataframe, It has all sorts of datatypes: int, float, object
. I'm trying to run VIF
function on this dataframe to get correlation in my variables but, it's throwing this error:
TypeError: '>=' not supported between instances of 'str' and 'int'
VIF Code:
vif = [variance_inflation_factor(df.values, i) for i in range(df.shape[1])]
print(vif)
What could be the reason, is it because I have strings in my data?