Incorporating API changes in polars 0.41
This commit is contained in:
parent
2097d2d21e
commit
8000ee75db
|
@ -7,7 +7,7 @@ use nu_protocol::{
|
||||||
Category, Example, LabeledError, PipelineData, ShellError, Signature, Span, SyntaxShape, Type,
|
Category, Example, LabeledError, PipelineData, ShellError, Signature, Span, SyntaxShape, Type,
|
||||||
Value,
|
Value,
|
||||||
};
|
};
|
||||||
use polars::prelude::{ChunkSet, DataType, IntoSeries};
|
use polars::{chunked_array::cast::CastOptions, prelude::{ChunkSet, DataType, IntoSeries}};
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct SetWithIndex;
|
pub struct SetWithIndex;
|
||||||
|
@ -96,7 +96,7 @@ fn command(
|
||||||
let casted = match indices.dtype() {
|
let casted = match indices.dtype() {
|
||||||
DataType::UInt32 | DataType::UInt64 | DataType::Int32 | DataType::Int64 => indices
|
DataType::UInt32 | DataType::UInt64 | DataType::Int32 | DataType::Int64 => indices
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.cast(&DataType::UInt32)
|
.cast(&DataType::UInt32, CastOptions::default())
|
||||||
.map_err(|e| ShellError::GenericError {
|
.map_err(|e| ShellError::GenericError {
|
||||||
error: "Error casting indices".into(),
|
error: "Error casting indices".into(),
|
||||||
msg: e.to_string(),
|
msg: e.to_string(),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user