【发布时间】:2021-03-07 06:32:38
【问题描述】:
我提前为图片道歉 - 我不知道如何在 stackoverflow 的单个单元格中表示多行。
我有一个 csv 文件,它在单个单元格中包含多行,如表 1 所示。我需要每个单元格中的每一行都有自己的列。幸运的是,每列每个单元格的行数相同。 IE。 column-1 每行 4 行,column-2 每行 2 行,依此类推...
我希望结果看起来像表 2,其中每行都有一列。我一直在尝试使用 splitlines() 来做到这一点,但没有成功。
表 2
| c1 | c2 | c3 | c4 | c5 | c6 | c7 | c8 | c9 | c10 | c11 | c12 | c13 | c14 | c15 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| City of Pflugerville | New Residential Permits | 1-1-2010 12:00:00 AM thru 3-6-2021 12:00:00 AM | City | 13-23598 | 6-11-2013 120000 AM | Residential | Residential Building | 1901 Meandering Meadows Dr | Falcon Point Sec 4 South | Ryland Homes | 1101 Arrow Point Dr. Ste. # 101 Cedar Park TX 78613 | 208200 | Living - 2914 - Total - 3786.00 | Permits Issued in the City: 4573 |
| City of Pflugerville | New Residential Permits | 1-1-2010 12:00:00 AM thru 3-6-2021 12:00:00 AM | City | 13-23599 | 6-11-2013 000 | Residential | Residential Building | 3309 Pasqueflower Pass | Falcon Pointe Sec 12 | Ryland Homes | 1101 Arrow Point Dr Cedar Park TX 78613 | 267100 | Living - 3853 - Total - 4856.00 | Permits Issued in the City: 4573 |
如果您能指出正确的方向,我将不胜感激。
【问题讨论】:
-
您可以将原始 csv 文件发布到前 n 行吗?