Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to specify decimal separator in Polars SQL read_csv table function. #15786

Open
jqnatividad opened this issue Apr 19, 2024 · 0 comments
Labels
A-io-csv Area: reading/writing CSV files enhancement New feature or an improvement of an existing feature

Comments

@jqnatividad
Copy link
Contributor

Description

Now that #15774 has been merged, it'd be great if Polars SQL users have to ability to specify their desired decimal operator with the Polars SQL read_csv table function.

Currently, it only supports one parameter - the CSV filepath.

#[cfg(feature = "csv")]
fn read_csv(&self, args: &[FunctionArg]) -> PolarsResult<(String, LazyFrame)> {
polars_ensure!(!args.is_empty(), ComputeError: "read_csv expected a path");
use polars_lazy::frame::LazyFileListReader;
let path = self.get_file_path_from_arg(&args[0])?;
let lf = LazyCsvReader::new(&path).finish()?;
Ok((path, lf))
}

@jqnatividad jqnatividad added the enhancement New feature or an improvement of an existing feature label Apr 19, 2024
@alexander-beedie alexander-beedie added the A-io-csv Area: reading/writing CSV files label Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-io-csv Area: reading/writing CSV files enhancement New feature or an improvement of an existing feature
Projects
None yet
Development

No branches or pull requests

2 participants