1T Conte commited on
Commit
95c7b39
1 Parent(s): 1af5c58

fix: metadata

Browse files
Files changed (38) hide show
  1. README.md +6 -7
  2. amazon_reviews_2013/test-0000-of-0018.parquet +2 -2
  3. amazon_reviews_2013/test-0001-of-0018.parquet +2 -2
  4. amazon_reviews_2013/test-0002-of-0018.parquet +2 -2
  5. amazon_reviews_2013/test-0003-of-0018.parquet +2 -2
  6. amazon_reviews_2013/test-0004-of-0018.parquet +2 -2
  7. amazon_reviews_2013/test-0005-of-0018.parquet +2 -2
  8. amazon_reviews_2013/test-0006-of-0018.parquet +2 -2
  9. amazon_reviews_2013/test-0007-of-0018.parquet +2 -2
  10. amazon_reviews_2013/test-0008-of-0018.parquet +2 -2
  11. amazon_reviews_2013/test-0009-of-0018.parquet +2 -2
  12. amazon_reviews_2013/test-0010-of-0018.parquet +2 -2
  13. amazon_reviews_2013/test-0011-of-0018.parquet +2 -2
  14. amazon_reviews_2013/test-0012-of-0018.parquet +2 -2
  15. amazon_reviews_2013/test-0013-of-0018.parquet +2 -2
  16. amazon_reviews_2013/test-0014-of-0018.parquet +2 -2
  17. amazon_reviews_2013/test-0015-of-0018.parquet +2 -2
  18. amazon_reviews_2013/test-0016-of-0018.parquet +2 -2
  19. amazon_reviews_2013/test-0017-of-0018.parquet +2 -2
  20. amazon_reviews_2013/train-0000-of-0018.parquet +2 -2
  21. amazon_reviews_2013/train-0001-of-0018.parquet +2 -2
  22. amazon_reviews_2013/train-0002-of-0018.parquet +2 -2
  23. amazon_reviews_2013/train-0003-of-0018.parquet +2 -2
  24. amazon_reviews_2013/train-0004-of-0018.parquet +2 -2
  25. amazon_reviews_2013/train-0005-of-0018.parquet +2 -2
  26. amazon_reviews_2013/train-0006-of-0018.parquet +2 -2
  27. amazon_reviews_2013/train-0007-of-0018.parquet +2 -2
  28. amazon_reviews_2013/train-0008-of-0018.parquet +2 -2
  29. amazon_reviews_2013/train-0009-of-0018.parquet +2 -2
  30. amazon_reviews_2013/train-0010-of-0018.parquet +2 -2
  31. amazon_reviews_2013/train-0011-of-0018.parquet +2 -2
  32. amazon_reviews_2013/train-0012-of-0018.parquet +2 -2
  33. amazon_reviews_2013/train-0013-of-0018.parquet +2 -2
  34. amazon_reviews_2013/train-0014-of-0018.parquet +2 -2
  35. amazon_reviews_2013/train-0015-of-0018.parquet +2 -2
  36. amazon_reviews_2013/train-0016-of-0018.parquet +2 -2
  37. amazon_reviews_2013/train-0017-of-0018.parquet +2 -2
  38. convert.py +14 -6
README.md CHANGED
@@ -7,7 +7,7 @@ dataset_info:
7
  - name: product/title
8
  dtype: string
9
  - name: product/price
10
- dtype: float16
11
  - name: review/helpfulness
12
  dtype: string
13
  - name: review/helpfulness_ratio
@@ -18,12 +18,11 @@ dataset_info:
18
  dtype:
19
  class_label:
20
  names:
21
- '0': null
22
- '1': 1 star
23
- '2': 2 stars
24
- '3': 3 stars
25
- '4': 4 stars
26
- '5': 5 stars
27
  - name: review/time
28
  dtype: int64
29
  - name: review/summary
 
7
  - name: product/title
8
  dtype: string
9
  - name: product/price
10
+ dtype: string
11
  - name: review/helpfulness
12
  dtype: string
13
  - name: review/helpfulness_ratio
 
18
  dtype:
19
  class_label:
20
  names:
21
+ '0': 1 star
22
+ '1': 2 stars
23
+ '2': 3 stars
24
+ '3': 4 stars
25
+ '4': 5 stars
 
26
  - name: review/time
27
  dtype: int64
28
  - name: review/summary
amazon_reviews_2013/test-0000-of-0018.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:bcdb7991e90a427bbe53b20bc535b8dd40b8e36acf53f4397097ba92257c45ba
3
- size 211620445
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:37c8c5344f74917c62a8e5faef78d43387959e561626f72056f43d13f3b0619c
3
+ size 209351250
amazon_reviews_2013/test-0001-of-0018.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:417f6253aad4264f3f7a63f3af12eb53167e36532f3058ae93b0510e9b1c139b
3
- size 237142680
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dbb5d2ee2565ef5ebbc66a6b9cd54cc3b754ea3b1380ce6f5d8391555dd4277f
3
+ size 234871827
amazon_reviews_2013/test-0002-of-0018.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:c0e8fc1645b52c7b421106bb5ca71fba8dd42d9d16e0594e3db3eb289c607fd7
3
- size 236079116
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cf96d8f5774fe88208b0e6b3fa753d684a05b426810be93e0c79422a154260db
3
+ size 233808194
amazon_reviews_2013/test-0003-of-0018.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:0617199da9e89b736b108a9d93116ff98046644fb1fa11740ce9140f017915b5
3
- size 236773267
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:28916928d211a14377c300cd099e1f62eda1681e344e1af6c9159406ca3f43a8
3
+ size 234502345
amazon_reviews_2013/test-0004-of-0018.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:c5230a9c03942cf402b246305c13776e1684d19217b40ae42b1ced2e74f68b10
3
- size 233679419
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5aba6523975f784f2078e963560d66d1f6245703a87b57984e34b2144603eb59
3
+ size 231408564
amazon_reviews_2013/test-0005-of-0018.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:955c9cf5857709b7353cc0358b9edd9751684973022fe12d27d3c77ba5fb8d58
3
- size 237271928
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:44ce4c21c4a44f11ef17cadad80b66cc6ce87da4573b5c0a4ad97860126a227d
3
+ size 235000986
amazon_reviews_2013/test-0006-of-0018.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:eec9bcc76474336c5c5dcb3daefbe578dcd51ea6332c7b86c0c1e01d0de2cfc8
3
- size 236223053
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cbfa018246c3aa3d6d582a64c56b535afffe1982b71be83b4d703664817d3b91
3
+ size 233952180
amazon_reviews_2013/test-0007-of-0018.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:db78343193403a0c2921f661f0a511271bdce90ff444c507a24c9f25a758a654
3
- size 163594183
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:98494e4a7500f17e1985b4453c3ab0a912a697f9e72c320ccb9d664f30404850
3
+ size 161323982
amazon_reviews_2013/test-0008-of-0018.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:e4e671d0fd345eed335aaaa611e38923cccf9b9d27fe257e227f4e46e26e8fee
3
- size 144977645
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7fcb9027c4c608bf6c8d17ee708924622e669f00bf7c278371e0d97968c2e3d4
3
+ size 142708974
amazon_reviews_2013/test-0009-of-0018.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:3f3c0249ed429262223916c788535ce0de4ee0ad45fdda6042625f90d1e73e4a
3
- size 237392189
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8be9f656b30714971f41b538f17540a0e68e57c6054358aa82ae071b5f1a79a1
3
+ size 235121176
amazon_reviews_2013/test-0010-of-0018.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:af882c47923b44d10c279a2d44cc84459ddf6de73b3e6dcb03d0e2217da74fd2
3
- size 237630619
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9d7928350fb8607e0605145fdb8f4eb2d10cda22e0b8d1a1c70aeca7dc5ba1b1
3
+ size 235359472
amazon_reviews_2013/test-0011-of-0018.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:69c8188a2b0881ce03507a133e91309e0b10fbfabfd1108294e1267853ccad0e
3
- size 234631329
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:157163bb3ffc8c9d4639d33e4ec11cdd8ca4313685eca073ce87fd9a38737274
3
+ size 232360213
amazon_reviews_2013/test-0012-of-0018.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:5a73941e92931e3d09b69ce80bcdfbd0acae0f6c2f468943d9433878e24ca1eb
3
- size 234291871
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fca976a270caf56bf607a0f9b4fc441283ab7db86091f44ee72830eaca2ff731
3
+ size 232021099
amazon_reviews_2013/test-0013-of-0018.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:c048a1be743f4fd9fd5697e5d831f0b7019fd793200bf5d0817e2eb73e477df1
3
- size 214165900
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0c20956540aa776d0480218d22088649cf3b798abfa9a501d5e02071bc060a12
3
+ size 211894959
amazon_reviews_2013/test-0014-of-0018.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:44dd3e2dcb17397229a68c6b85b70193cc05446daaf33bd180fce393dec78dff
3
- size 214565722
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b6de104deddb7d79e834d176bcd3b997bb520d8ecdc4bfb7966fb30e3f55b5a3
3
+ size 212294366
amazon_reviews_2013/test-0015-of-0018.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:15c6b4bb6957accada5e71b3a99b28365b45f7fd54763c3544160618e3d5cae2
3
- size 214302528
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:885444e10ddbadc604257fce02886fa8595d833f0e34d994b38da34a1a388806
3
+ size 212031197
amazon_reviews_2013/test-0016-of-0018.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:9d4e9f87935f3c9ef3d8dce193b9f060af166db27de07b3d30b15616b8b11fdb
3
- size 154198795
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6e03ced27e2641d16ff20cb1c74319c5e4785f8b2385feaed10cf76f1ed60cf4
3
+ size 151929391
amazon_reviews_2013/test-0017-of-0018.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:42223181584d276d54826e1759392368f8a74c2fe4a5a89bf663ab508da5c1d0
3
- size 114742961
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0df406453b0e1206f01cc7128d95c210a38db1b096b23ace6c83a49b0b6062e5
3
+ size 113117761
amazon_reviews_2013/train-0000-of-0018.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:169c97b8f2a7e94d02abdcec4f944628e1aebdeb8a5b4eb4b981beb8a13ae735
3
- size 844455395
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ebeb869c57e454d082a1b15337b0e5471d451383724bd3db510fd6f41201725d
3
+ size 835936917
amazon_reviews_2013/train-0001-of-0018.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:9e2f876ca6409c4c26f38f6f31e6326602b70ff0cdb8bafe71ea29ad7b95c499
3
- size 948066517
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cb8b219efdf0611a795b83f70fd69897b967b6532779b026678af3ec049650f3
3
+ size 939543599
amazon_reviews_2013/train-0002-of-0018.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:6c5192add5959cf7c17d48f56d99996ceddd31f7c59b276f0d174249a028d7ca
3
- size 947424455
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7fd32074ba5537c06d1ea4d7695719682ff54a57b57ee7d5cc95965b5a8e628d
3
+ size 938901593
amazon_reviews_2013/train-0003-of-0018.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:cb74319f7db4c5406516d4f122a204881bd5517141b1de3334705596a3670b7b
3
- size 945306639
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:615fdc7162c23ea2171b0311201febd41bcdb125d99272807d8df72f4304d9c8
3
+ size 936783771
amazon_reviews_2013/train-0004-of-0018.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:486ea3ce0e0a479c7df24dab714484c127103dd6d76a9d1135c4e4dcce75fcca
3
- size 933642844
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:df6bb066f7e4cfc6dbd3c0a972def8532f9d49939da62edd681dba856e8225f9
3
+ size 925119695
amazon_reviews_2013/train-0005-of-0018.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:3b3141d6e4fb25c20e561adddf018af1ff59141dd9f7b18da91f8a55cfd84898
3
- size 950926371
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e5e6cec7a3412c4e2843cdc975ca45c8de3594cb06c1d7d0d0213cbfd1a9f38a
3
+ size 942403404
amazon_reviews_2013/train-0006-of-0018.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:23f1e05f7b332b675bb57426e9553c6c4a31f3629af350ee3a5e7e6b25146390
3
- size 947963752
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:baa3b1343c1d3ed58e6f43afeff000961d93110b10628365c671646cf1417204
3
+ size 939440764
amazon_reviews_2013/train-0007-of-0018.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:e5ddf8d88c2dfdf5ec0df62b6f6145ad086eeed0518c0ef9c0e6dc265f4b634e
3
- size 654681409
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6553a0c3104c70adf717322ee2bd2a339e04a08ca8da992f5e7362c4ae273955
3
+ size 646160666
amazon_reviews_2013/train-0008-of-0018.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:eeeceae0609957fa7fbdbf2c42a14a81adf2b1cdddbdf9bdc941ff8b4b6813a3
3
- size 580268754
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1cc65933c8cc0969027758e26dbe4a16bd9f988879ba8f5a592af4475fb0c79c
3
+ size 571751136
amazon_reviews_2013/train-0009-of-0018.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:20cd17e1c0c1b539947428805c3f574a311caaa64e2e6303a148324f83c1818b
3
- size 952790958
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6b300d92d51c12c133937e2f70c69db40e1283bc62a502aa3ec3617e8e3bb41e
3
+ size 944267519
amazon_reviews_2013/train-0010-of-0018.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:3c86c494f0c50e20465186c59710972b8456e7ffc7d7500e0d3b777b9017ae05
3
- size 955073788
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9cc23ae0e3b93ca77d25197a4b27d1399a82fc5cb9d5525c1a280156864439f1
3
+ size 946550284
amazon_reviews_2013/train-0011-of-0018.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:0818e18434699a99ecf7d28075c9f6ec605baa543bc3d7ee45e7ff3e402626e8
3
- size 944795161
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6b6f7037ce2039a94762d6d3dca005d3f2b43614ab5cc1ebd1ec3cfc71677ea2
3
+ size 936271631
amazon_reviews_2013/train-0012-of-0018.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:aba7e9f831b140cf805cfd369e88c8bb4f620966c884186b2d30cdb0a2f25b07
3
- size 939717459
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e829124de8c5c6196fd9f57a066e443d6ecc171221ee4d63f0eedee28b02e203
3
+ size 931195064
amazon_reviews_2013/train-0013-of-0018.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:535cae9298a3ecaa704fa7984a226fa31e029e3f05a485dd402633580f7d70c9
3
- size 857077473
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:084882ab40f551c6ce60b4f4108cb7b197a5caa3c99243c3264767a3d9584614
3
+ size 848554000
amazon_reviews_2013/train-0014-of-0018.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:56d71ba5eb43ce40ae9a77e1a3d58c4ca33e5923b061c95b06cba5310b2d92b5
3
- size 861674975
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e5c63fb6d282bb2e135f7830386ad0215d713392379d12d092c808cd30c0ca8e
3
+ size 853150745
amazon_reviews_2013/train-0015-of-0018.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:8c5777005c5e3a13923cdb838f5f614fdaaca142dc34b0a956a8b5377ff619c4
3
- size 856333984
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f47c16435c22e438809f18073c5277309b0bd529c4f3ed81aaf573187516da5c
3
+ size 847809703
amazon_reviews_2013/train-0016-of-0018.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:01050c572b8f782dd4648224212b2e4cf5afc3ec5de029759c7406f56280d665
3
- size 616481413
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5a7b4a0743dcb96177024da469d0ee14edaf3ac00277a279e646de6bdbfcc0b8
3
+ size 607961510
amazon_reviews_2013/train-0017-of-0018.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:7d51cde9ee1ebb4062569bb7088efa6c6259cb6d9a9fc9d637ac29c474978bb8
3
- size 459343194
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e4dc27bbb768e68783b3f00ba04becca47072636106fd0db818683c17f2684d0
3
+ size 453600036
convert.py CHANGED
@@ -6,7 +6,9 @@ Usage:
6
  $ python convert.py
7
  """
8
 
 
9
  import os
 
10
  import gzip
11
 
12
  from glob import glob
@@ -51,6 +53,14 @@ CATEGORIES = {
51
  "Watches.txt.gz": "Watch", # 68,356 reviews
52
  }
53
 
 
 
 
 
 
 
 
 
54
  CATEGORIES_LIST = list(CATEGORIES.values())
55
 
56
 
@@ -89,8 +99,8 @@ def save_parquet(data, chunk):
89
 
90
  df_train, df_test = train_test_split(df, test_size=TEST_SIZE, random_state=42)
91
 
92
- df_train.to_parquet(fname_train)
93
- df_test.to_parquet(fname_test)
94
 
95
 
96
  def parse_file(filename):
@@ -124,12 +134,10 @@ def clean(entry):
124
 
125
  if entry["product/price"] == "unknown":
126
  entry["product/price"] = None
127
- else:
128
- entry["product/price"] = float(entry["product/price"])
129
 
130
- entry["review/score"] = int(float(entry["review/score"]))
131
  entry["review/time"] = int(entry["review/time"])
132
- entry["product/category"] = CATEGORIES_LIST.index(entry["product/category"])
133
 
134
  numerator, demoninator = entry["review/helpfulness"].split("/")
135
  numerator = int(numerator)
 
6
  $ python convert.py
7
  """
8
 
9
+ import math
10
  import os
11
+ import sys
12
  import gzip
13
 
14
  from glob import glob
 
53
  "Watches.txt.gz": "Watch", # 68,356 reviews
54
  }
55
 
56
+ REVIEW_SCORE = {
57
+ "1.0": 0,
58
+ "2.0": 1,
59
+ "3.0": 2,
60
+ "4.0": 3,
61
+ "5.0": 4,
62
+ }
63
+
64
  CATEGORIES_LIST = list(CATEGORIES.values())
65
 
66
 
 
99
 
100
  df_train, df_test = train_test_split(df, test_size=TEST_SIZE, random_state=42)
101
 
102
+ df_train.to_parquet(fname_train, index=False)
103
+ df_test.to_parquet(fname_test, index=False)
104
 
105
 
106
  def parse_file(filename):
 
134
 
135
  if entry["product/price"] == "unknown":
136
  entry["product/price"] = None
 
 
137
 
138
+ entry["review/score"] = REVIEW_SCORE[entry["review/score"]]
139
  entry["review/time"] = int(entry["review/time"])
140
+ entry["product/category"] = int(CATEGORIES_LIST.index(entry["product/category"]))
141
 
142
  numerator, demoninator = entry["review/helpfulness"].split("/")
143
  numerator = int(numerator)