You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just a note in case it's helpful to anyone else - I seemed to be getting 100% accuracy with the on-line sentiment analysis classifier (pages 246-246), but it turned out to be because the code used to shuffle the dataset before exporting it to CSV on page 235 hadn't worked.
In the version of pandas I'm using (0.23.4), it looks like df.index.values is needed in order to get the indexes of a DataFrame as a list. So, this:
Just a note in case it's helpful to anyone else - I seemed to be getting 100% accuracy with the on-line sentiment analysis classifier (pages 246-246), but it turned out to be because the code used to shuffle the dataset before exporting it to CSV on page 235 hadn't worked.
In the version of pandas I'm using (0.23.4), it looks like
df.index.values
is needed in order to get the indexes of a DataFrame as a list. So, this:df = df.reindex(np.random.permutation(df.index))
now needs to be this:
df = df.reindex(np.random.permutation(df.index.values))
Hope that helps someone!
The text was updated successfully, but these errors were encountered: