pydata/pandas — pull request #2964 by hayd (2013-03-04 11:44:25+00:00)
Title: Assert_frame_equal check_names to True

This is a follow up to #2962, where I added a `check_names=False` argument to `assert_frame_equal`, this defaults it to `True`. That is, when asserting two DataFrames are equal, it compares `.columns.names` and `.index.names`, unless explicitly passing `check_names=False`.

I've added in `check_names=False` where it wouldn't make sense to check names. I've added a TODO comment (and `check_names=False`) where I think it probably *should* work but isn't... This was in the following cases:

to_csv
reindex
reset_index
groupy-a-get
pop
join (dataframe to a series)
from_xls (when setting index as first column)

i.e. these appear to drop column names (`df.columns.names`). Whether this behaviour is correct / desired in these cases, I'm not sure, but here they all are. :)

*Note: By changing the A1 cells to 'index', I had all but one test (labelled "read xls ignores index name ?") in `test_excel.py` working locally (with `check_names=True`) , however Travis was less convinced throwing:*

InvalidFileException: "There is no item named 'xl/theme/theme1.xml' in the archive"

*so I reverted to the previous xls and xlsx, and added back in `check_names=False`. I suspect LibreOffice wasn't saving it properly...?*