数据集是一个包含三列的大文件:一个部分的ID,一些不相关的内容和一行文本.示例可能如下所示:
A01 001 This is a simple test.
A01 002 Just for exemplary purpose.
A01 003
A02 001 This is another text
Run Code Online (Sandbox Code Playgroud)
我想使用第一列(在此示例中为A01和A02,表示不同的文本)作为文件名,其内容是第二列之后该行中的所有内容.
上面的示例应该会生成两个文件,一个包含名称A01和内容:
This is a simple test.
Just for exemplary purpose.
Run Code Online (Sandbox Code Playgroud)
另一个A02内容如下:
This is another text
Run Code Online (Sandbox Code Playgroud)
我的问题是: