jtornero/pandas — pull request #1 by jtornero (2013-05-30 12:32:14+00:00)
Title: DataFrame excel output: Trying to run tests

Thank you for your kind suggestions.

About the first issue in your last message, it hasn't been a problem, just matter of moving.

About the tests, I've make a test following the instructions inhttp://pandas.pydata.org/developers.html but I can't manage to pass it, *but* I pass it "manually".

1) the test creates a dframe with only ascii-espace data, saves it as excel and retrieves it to dataframe again
2) then the same but with non-ascii characters
3) then the same, that in 1 and 2 but with two datasets and using ExcelWriter in place of DataFrame.to_excel.

I' can't manage to pass the tests, but I can run them manually in iptyhon an it works porperly:

import pandas as pd
data_noascii = {
'index' : ['Año', 'Baldío', 'Trócola', 'Mínimo', 'Barça', 'Cigüeña'],
'columns' : ['Año', 'Narices', 'Búlgaro', 'Libélula', 'Cínico', '1º'],
'values' : ['Céfiro', 'Tarugo', 'Déspota', 'Camión', 'Añejo', 'º']
}

frame_noascii=pd.DataFrame(data_noascii)

frame_noascii.to_excel('./text.xls', sheet_name='Test_noascii') # this throws the appropiate UnicodeError

frame_noascii.to_excel('./text.xls', sheet_name='Test_noascii', encoding='utf8' ) # this works as expected

get_xls_noascii = pd.ExcelFile('./test.xls')

rec_frame = get_xls.parse('Test_noascii')

Wellt least visually, in ipython

rec_frame and frame_noascii contains the same data (try it in ipython and also see it nosetests output)

The output from nosetests is in my repo base folder, called tests2.txt

Best regards

Jorge Tornero