Я изо всех сил пытаюсь понять это. Мне нужно создать объект панды DataFrame со следующими записями для каждого обзора:Python Чтение конкретных данных из текстового файла
- ID продукта
- Количество людей, которые голосовали этот отзыв полезным
- Общее число людей, которые оценили этот отзыв
- Рейтинг продукта
- Текст обзора
Если кто-то может даже просто помочь мне начать работу о том, как печатать все микрофильтр t/productID, что было бы оценено.
Вот пример моего текстового файла: (жаль, что я не знаю, как правильно отформатировать его, когда я вхожу на этом сайте)
product/productId: B001E4KFG0
review/userId: A3SGXH7AUHU8GW
review/profileName: delmartian
review/helpfulness: 1/1
review/score: 5.0
review/time: 1303862400
review/summary: Good Quality Dog Food
review/text: I have bought several of the Vitality canned dog food products and have found them all to be of good quality. The product looks more like a stew than a processed meat and it smells better. My Labrador is finicky and she appreciates this product better than most.
product/productId: B00813GRG4
review/userId: A1D87F6ZCVE5NK
review/profileName: dll pa
review/helpfulness: 0/0
review/score: 1.0
review/time: 1346976000
review/summary: Not as Advertised
review/text: Product arrived labeled as Jumbo Salted Peanuts...the peanuts were actually small sized unsalted. Not sure if this was an error or if the vendor intended to represent the product as "Jumbo".
product/productId: B000LQOCH0
review/userId: ABXLMWJIXXAIN
review/profileName: Natalia Corres "Natalia Corres"
review/helpfulness: 1/1
review/score: 4.0
review/time: 1219017600
review/summary: "Delight" says it all
review/text: This is a confection that has been around a few centuries. It is a light, pillowy citrus gelatin with nuts - in this case Filberts. And it is cut into tiny squares and then liberally coated with powdered sugar. And it is a tiny mouthful of heaven. Not too chewy, and very flavorful. I highly recommend this yummy treat. If you are familiar with the story of C.S. Lewis' "The Lion, The Witch, and The Wardrobe" - this is the treat that seduces Edmund into selling out his Brother and Sisters to the Witch.
В каком поле находится '' 'Количество проголосовавших'''' и' '' число людей, которые оценили '' '? – wwii