Update dataframe_to_rows to fix uneven indices
This should resolve #1904 (closed) and #1908 (closed). The change to the test is just making the index uneven in size in case there's some future change to it.
Thanks to @xrcyz for the assistance debugging it. --HG-- branch : 3.1