How do I read a fix width format text file in pandas

后端 未结 4 1985
Happy的楠姐
Happy的楠姐 2020-12-07 01:16

I just got my hands on pandas and am figuring out how I can read a file. The file is from WRDS database and is the SP500 constituents list all the way back to 1960s. I check

4条回答
  •  忘掉有多难
    2020-12-07 01:45

    pandas.read_fwf() was added in pandas 0.7.3 (April 2012) to handle fixed-width files.

    1. API reference

    2. An example from other question

提交回复
热议问题