file1.csv가 있다고 가정해 보겠습니다.
OU Mailfile
CORP:Jenny Smith: mail/246802.nsf
"CORP:John Smith:,John Smith:" mail/123456.nsf
STORE:Mary Poppins: mail/789012.nsf
STORE:Tony Stark: mail/345678.nsf
STORE:Carmen Sandiego: mail/901234.nsf
NEWS:Peter Parker: mail/567890.nsf
NEWS:Clark Kent: mail/654321.nsf
STORES:store123 mail/369121.nsf
그런 다음 file2.csv:
OU
CORP
STORE
NEWS
'CORP', 'STORE' 또는 'NEWS'가 있는 file2.csv의 모든 줄에 대해 file1.csv를 검색하여 STOREall.csv, CORPall.csv 및 NEWSall과 같은 파일을 만들고 싶습니다. .csv.
따라서 STOREall.csv와 같은 파일에는 다음이 있어야 합니다.
OU Mailfile
STORE:Mary Poppins: mail/789012.nsf
STORE:Tony Stark: mail/345678.nsf
STORES:store123 mail/369121.nsf
CORPall.csv:
OU Mailfile
CORP:Jenny Smith: mail/246802.nsf
CORP:John Smith:,John Smith: mail/123456.nsf
그런 다음 NEWSall.csv
OU Mailfile
NEWS:Peter Parker: mail/567890.nsf
NEWS:Clark Kent: mail/654321.nsf
Mailfile 열이 아닌 OU 열만 가질 수 있다면 그것도 좋을 것입니다. 그러나 나는 그것을 위해 usecols=['OU'] 할 수 있다고 생각합니다.
내 실수. 지금 거기 있어요. 수동으로 복사하여 붙여넣었고 그녀를 놓쳤을 것입니다.
NewTechie2022-02-06 07:21:12
왜 STOREall에는 STORE:Carmen Sandiego:가 없나요?
enke2022-02-06 07:21:12