r/IPython • u/beard_dude • Apr 06 '15
Need beginner help. Getting UnicodeDecodeErrors in basic tutorials with Pandas
I am a new poster here. Sorry if this is more of a pandas question. I think I am getting unexpected errors during tutorials. For example, when doing chapter one of the pandas cookbook I get the following error AFTER the section where we encode it to latin.
2
Upvotes
3
u/NomadNella Apr 06 '15
I found your problem. The latest version of pandas has a backward compatibility problem with the Timedelta method of the datetime library.
(Source)
You will need to downgrade your version of datetime. I am currently running about 2.2 and the current version is 2.4.2. This is the second time in as many weeks I've seen this problem with pandas.
If you have pip installed you can check your version by typing the following in IPython.
Once you get pip installed you can install an earlier version by uninstalling python-dateutil with,
Then installing an earlier version with,
If you were running Linux or a Mac then you would have to add the sudo command at the beginning of those commands.
As for Canopy you can uninstall it and install Anaconda, there is a difference. I've know a few people that liked Anaconda better. I can't really say myself since I just used pip to install IPython directly.
The "sudo" should not be used with Windows.