How to write a pandas Series to CSV as a row, not as a column?
问题 I need to write a pandas.Series object to a CSV file as a row, not as a column. Simply doing the_series.to_csv( 'file.csv' ) gives me a file like this: record_id,2013-02-07 column_a,7.0 column_b,5.0 column_c,6.0 What I need instead is this: record_id,column_a,column_b,column_c 2013-02-07,7.0,5.0,6.0 This needs to work with pandas 0.10, so using the_series.to_frame().transpose() is not an option. Is there a simple way to either transpose the Series, or otherwise get it written as a row? Thanks