Newbie question on dataframe error

Hi all,
Noob-ish question alert!
Am trying to read in a csv as a dataframe, but keep getting the below mentioned error (using version 0.14.0 as an example.

error: failed to select a version for the requirement dataframe = "^0.14.0"
candidate versions found which didn't match: 0.1.0

However, when I follow the instructions and set dataframe = "0.1.0" in depencies I get the following error instead.
error[E0432]: unresolved import dataframe::DataFrame

Happy to learn more and get flamed for being a noob in the process!



Where did you get the 0.14.0 version number? The dataframe crate is completely empty and hasn't changed for 7 years. You're likely looking for a differently named crate.

Thanks much! Apologies for the typo, have fixed the dependency to polars instead of dataframe and the code runs.

That said, I am now facing another error; code below cases segmentation fault, any advice on how to proceed to debug, please?

fn main(){
  let ifile = "file.csv";
  let df = read_csv(&ifile).unwrap();
  println!{"{}", df.head(Some(5))};

I'd first check the command's output to see whether this is a segfault or just a panic.

If it's a panic, set the RUST_BACKTRACE=1 environment variable and re-run the command to get a backtrace of the where the error came from. Panics are usually pretty easy to troubleshoot because you also get a panic message which explains what went wrong and the line that triggered the panic.

If it's a segfault (which is really surprising and indicates something really bad happened) then your best bet is to re-run the program under a debugger because it'll pause when the segfault is triggered and give you a chance to see where the issue occurred, check the state of local variables, print a backtrace, and so on.


This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.