hyp1231 commited on
Commit
42126c7
1 Parent(s): 62a0480

Fix bug in item metadata parsing scripts

Browse files
Files changed (1) hide show
  1. Amazon-Review-2023.py +5 -3
Amazon-Review-2023.py CHANGED
@@ -88,9 +88,11 @@ class AmazonReview2023(datasets.GeneratorBasedBuilder):
88
  Here we dump it to string to make huggingface datasets easy
89
  to store.
90
  """
91
- if isinstance(self.config, RawMetaAmazonReview2023Config) and \
92
- 'details' in dp:
93
- dp['details'] = json.dumps(dp['details'])
 
 
94
  except:
95
  continue
96
  else:
 
88
  Here we dump it to string to make huggingface datasets easy
89
  to store.
90
  """
91
+ if isinstance(self.config, RawMetaAmazonReview2023Config):
92
+ if 'details' in dp:
93
+ dp['details'] = json.dumps(dp['details'])
94
+ if 'price' in dp:
95
+ dp['price'] = str(dp['price'])
96
  except:
97
  continue
98
  else: