pandas-dev / pandas

Flexible and powerful data analysis / manipulation library for Python, providing labeled data structures similar to R data.frame objects, statistical functions, and much more
https://pandas.pydata.org
BSD 3-Clause "New" or "Revised" License
43.25k stars 17.79k forks source link

Add to_fwf support #10415

Open cancan101 opened 9 years ago

cancan101 commented 9 years ago

Right now pandas can read fwf but there is no to_fwf. From SO.

This output format seems similar to what numpy.savetxt handles.

jreback commented 9 years ago

see xref here: https://github.com/pydata/pandas/issues/3190

koubaa commented 1 year ago

Hello! Try using hollerith. pypi github. It's a (very) new python library that I developed that deals with fixed width formatting - and open to contribution. Unfortunately trying to use built-in python string formatting (or the C printf for that matter!) for fixed width doesn't work well for some widths when there are large integers and certain double precision floats.

swarajban commented 1 year ago

+1 on this feature request

Tammura commented 4 months ago

Anyone is working on this feature? I'm trying using to_string() method but it has no option to remove space between output columns