Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

amazon.rs 595 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
  1. //! Structs defining Amazon data sets.
  2. use serde::{Serialize, Deserialize};
  3. use crate::prelude::*;
  4. use crate::arrow::*;
  5. /// A rating as described in a source CSV file.
  6. #[derive(Serialize, Deserialize)]
  7. pub struct SourceRating {
  8. pub user: String,
  9. pub asin: String,
  10. pub rating: f32,
  11. pub timestamp: i64,
  12. }
  13. /// Structure for scanned ratings.
  14. ///
  15. /// This data structure is seralized to `ratings.parquet` in the Amazon directories.
  16. #[derive(ParquetRecordWriter, Serialize, Deserialize)]
  17. pub struct RatingRow {
  18. pub user: i32,
  19. pub asin: String,
  20. pub rating: f32,
  21. pub timestamp: i64,
  22. }
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...