pandas – Python: data argument cant be an iterator
pandas – Python: data argument cant be an iterator
zip cannot be used directly, you should give the result as a list i.e.:
x = pd.DataFrame(list(zip(data, vote)), columns=[annual_income, outlier])
Edit (from bayethierno answer) :
Since the release 0.24.0, we dont need to generate the list from the zip
anymore, the following statement is valid :
x = pd.DataFrame(zip(data, vote), columns=[annual_income, outlier])
This actually works in pandas version 0.24.2 without having to use list around zip
pandas – Python: data argument cant be an iterator
write like this
coef = DataFrame(list(zip(x.columns,np.transpose(log_model.coef_))))