我的数据框如下所示:
exp gamma% proba-a% spread-test in %
0 -6.415879 0.100 34.503457 0.1277374979529247122928732004
1 -4.558370 0.200 26.517913 0.1277374979529247122928732004
2 -2.821595 0.300 17.875550 0.1277374979529247122928732004
3 -2.118973 0.400 14.736015 0.1277374979529247122928732004
4 -1.665637 0.500 12.837838 0.1277374979529247122928732004
5 -1.326727 0.600 11.467630 0.1277374979529247122928732004
6 -1.048364 0.700 10.314268 0.1277374979529247122928732004
7 -0.819480 0.800 9.355751 0.1277374979529247122928732004
8 -0.623309 0.900 8.475801 0.1277374979529247122928732004
9 -0.466824 1.000 7.847266 0.1277374979529247122928732004
我想把它写在一个excel表中。我尝试了什么:
from pandas import ExcelWriter
writer = ExcelWriter('spread32.xlsx')
yourdf.to_excel(writer)
writer.save()
但是excel文件中没有写任何东西,它仍然是空的。
是因为我使用的是 jupyter notebook 吗?excel文件已经存在。