Read CSV Files with Rust CSV Crate 🦀📦 Rust Programming Tutorial for Developers
HTML-код
- Опубликовано: 11 сен 2024
- Reading CSV files is a common need for exchanging data between systems. Although more modern serialization formats are available, such as JSON, some legacy vendor systems still use CSV to this day. Using the open source CSV crate, we can easily read various CSV formats. If you need to customize the behavior of the CSV parser, such as changing the field delimiter, adding CSV headers, or commenting out individual data records, you can use the csv::ReaderBuilder struct to accomplish that. In addition, you can optionally integrate CSV with the serde package to deserialize CSV data rows as Rust struct instances. We'll explore all of these topics in this Rust training video!
🚨📦 Help support this channel - shop through my Amazon storefront!
⬇️⬇️⬇️
www.amazon.com...
⬆️⬆️⬆️
🤯 Rust Programming Playlist 🦀 • Rust Programming Tutor...
📖 Rust std::process module📦➡️ doc.rust-lang....
Visual Studio Code ➡️ code.visualstu...
Rust Website ➡️ rust-lang.org
Rustup Installer ➡️ rustup.rs
Rust Docs ➡️ doc.rust-lang....
Please follow me on these other social channels!
➡️ trevorsullivan...
➡️ github.com/pcg...
➡️ / pcgeek86
➡️ / trevorsullivan
➡️ / trevorsoftware
➡️ tiktok.com/pcg...
All trademarks, logos and brand names are the property of their respective owners. All company, product and service names used in this website are for identification purposes only. Use of these names,trademarks and brands does not imply endorsement.
#rustlang #rust #rustdev #opensource #software #linux #devops #programming #rusty #dev #coding #codinglife #code #coder #ubuntu #ubuntulinux #appdev #developer
🚨📦 Help support this channel - shop through my Amazon storefront!
⬇⬇⬇
www.amazon.com/shop/trevorsullivan
⬆⬆⬆
Really outstanding - best RDR tutorial I’ve seen
where have you been sir up until now? loved your way of teaching. liked and subbed.
Thanks for your videos! This channel is truly underrated!
In Europe we separate our partials with comma so American 3.14 would be 3,14 in Europe, so more and more you would find a ";" as divider in csv files. Great video btw!
hi, super video. i have the problem that in the csv file the decimal point is a comma instead of point. i become a ParseFloat(ParseFloatError). pls excuse me my bad english
Thank you for your support! You'll probably need to fix the CSV data before you'll be able to read it with the CSV parser in Rust. You'll have to write a script to parse it yourself and then add double quotes around the decimal value. I would probably use PowerShell for this purpose.
thnk you very much, i have write my own Deserialize function and now passed without failure
@@sgremm that's an even better idea! Great job! God bless you 🦀
Actual tutorial starts at 12:30
Can get raw real world data csv’s via kaggle too
Good idea to grab data from Kaggle.
@@TrevorSullivan when I was learning pandas (python) I used a couple of them; things like phone purchases based on ages and country or something and top Spotify artists of 2024 -
Funnily enough hearing that rust handles data as bytes first - string second was kind of amusing to me because I ran Into a UTF-8 encoding issue with pandas that I had to solve by passing it as bytes anyway lol