으로 모두 csv 형식으로 변환하기 전에 비슷한 질문을했지만 아직 해결하지 못했습니다.아마존 데이터를 파이썬
아마존의 리뷰 데이터 세트가 있고 파이썬에서 CSV 형식으로 변환하고 싶습니다. 나는 다음과 같이 가지고있는 원래 데이터 :
product/productId: B00032K32A
product/title: Cruiser Accessories 21330 Slim Rim, Chrome License Plate Frame
product/price: 4.99
review/userId: A2O41UFL8HAQWV
review/profileName: Nick Nefsik
review/helpfulness: 4/4
review/score: 5.0
review/time: 1239667200
review/summary: It's slim, alright!
review/text: Similar to another review, I also found that this frame is more of a overlay to a license plate (sits on top of the plate), as opposed to securing the plate underneath it, if that makes sense.It *just* covers the edges of my AZ plate, which is fine, but I sure wouldn't want it to be any smaller around its outside perimeter. I also ordered the chrome covers for the screws (Cruiser Accessories 82030 Screw Covers, Chrome) that I was already using, and, altogether, it looks great, and is exactly the look I was going for.
product/productId: B00032K32A
product/title: Cruiser Accessories 21330 Slim Rim, Chrome License Plate Frame
product/price: 4.99
review/userId: A3V7H58BH72AYT
review/profileName: Illustratedman
review/helpfulness: 6/7
review/score: 5.0
review/time: 1199145600
review/summary: Nice...
review/text: I first purchased these for my new 2008 Honda Accord EX-L to complement the chrome on the car and though they looked nice I eventually ordered the 20130 version of the Cruiser chrome frame for the wider border.
결과는 다음과 같아야합니다
product/productId, product/title, product/price, review/userId, review/profileName, review/helpfullness, review/score, review/time, review/summary, review/text
B00032K32A, Cruiser Accessories 21330 Slim Rim, Chrome License Plate Frame, 4.99, A2O41UFL8HAQWV, Nick Nefsik, 4/4, 5.0, 1239667200, It's slim, alright!, Similar to another review, I also found that this frame is more of a overlay to a license plate (sits on top of the plate), as opposed to securing the plate underneath it, if that makes sense.It *just* covers the edges of my AZ plate, which is fine, but I sure wouldn't want it to be any smaller around its outside perimeter. I also ordered the chrome covers for the screws (Cruiser Accessories 82030 Screw Covers, Chrome) that I was already using, and, altogether, it looks great, and is exactly the look I was going for.
B00032K32A, Cruiser Accessories 21330 Slim Rim, Chrome License Plate Frame, 4.99, A3V7H58BH72AYT, Illustratedman, 6/7, 5.0, 1199145600, Nice..., I first purchased these for my new 2008 Honda Accord EX-L to complement the chrome on the car and though they looked nice I eventually ordered the 20130 version of the Cruiser chrome frame for the wider border.
내가 그래서 위와 같은 형식의 데이터의 꽤 큰 금액을 (더 3백메가바이트 이상)이 그것을 인쇄하는 대신에 쓰려고합니다.
나는 파이썬에 대한 새비지로 여러 가지 방법을 시도했지만 아직 성공하지 못했습니다. 원래 데이터 형식을 CSV 형식으로 변환하는 것에 대해 좋은 생각을 가진 사람이 있습니까?
빠른 참고 : 데이터에는 쉼표가 포함되어 있습니다. 따라서 데이터 세트를 쉼표로 구분 된 파일로 변환하면 표제가 정렬되지 않습니다. 데이터의 쉼표를 '-'또는 다른 것과 같이 다른 것으로 변환해야합니다. 이를 위해'replace' 메소드를 사용하십시오. – ssm