How do I read/convert an HDF file containing a pandas dataframe written in Python 2.7 in Python 3.6?
Not exactly a solution but more of a workaround.
I simply read the files in their corresponding Python versions and saved them as a CSV file, which can then be read any version of Python.
I wrote a dataframe in Python 2.7 but now I need to open it in Python 3.6, and vice versa (I want to compare two dataframes written in both versions).
If I open a Python2.7-generated HDF file using pandas in Python 3.6, this is the error produced:

UnicodeDecodeError: 'ascii' codec can't decode byte 0xde in position 1: ordinal not in range(128)

If I open a Python3.6-generated HDF file using pandas in Python 2.7, this is the error:

ValueError: unsupported pickle protocol: 4

For both cases I simply saved the file by df.to_hdf.
Does anybody have a clue how to go about this?