fix failing to_dataframe() test on python 3