From the course: Rust for Data Engineering

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Process CSV files in Rust

Process CSV files in Rust - Rust Tutorial

From the course: Rust for Data Engineering

Process CSV files in Rust

- Okay, I'm inside of AWS Cloud9, here and I want to work with some CSV files. Fortunately, it's very straightforward in Rust. So what I'm going to do is I'm going to first create a new project. So let's go ahead and say cargo new csv-demo. Great. Now that I got that, I'll go ahead and get into this project and let's go ahead and check it out. So we've got csv-demo here and we have a cargo file that we're going to need to add a library to. So in order to do that, what I'll need to do is toggle to a library that we can use. So let's go ahead and use CSV itself, appropriately named. Let's go ahead and put that in, csv. Now, one of the nice things about the Rust language is I can also look at the CSV documentation here and just see what's going on and we can see here, oh, okay it looks like there's a 1.2.2. So maybe that's the version we actually want to play around with. Okay, perfect. Now the next thing that we can do is…

Contents