@@ -193,7 +193,7 @@ struct TimeZone { fn convert_timezone(input_fields: &[Field], kwargs: TimeZone) -> PolarsResult<Field> { FieldsMapper::new(input_fields).try_map_dtype(|dtype| match dtype { DataType::Datetime(tu, _) => Ok(DataType::Datetime(*tu, Some(kwargs.tz.clone()...
We read every piece of feedback, and take your input very seriously. Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Cancel Create saved search Sign in Sign up Reseting focus {...
string -String,Binary,Categorical temporal -Date,Datetime,Time,Duration nested -List,Struct,Array other -Object,Null Get column types df.schema For a specific column df["a"].dtype Cast a column df["a"].cast(Polars::Int32) Visualization ...
@@ -39,6 +39,9 @@ impl std::convert::From<PyPolarsErr> for PyErr { PolarsError::StructFieldNotFound(err) => { StructFieldNotFound::new_err(err.to_string()) } PolarsError::StringCacheMismatch(err) => { StringCacheMismatchError::new_err(err.to_string()) ...
output_type_func -> to define a function that computes the output type based on input types. Here is an example of a String conversion expression that converts any string to pig latin: fn pig_latin_str(value: &str, capitalize: bool, output: &mut String) { if let Some(first_char) =...
I tried to add return type with the nested struct, the result still not good. Expected behavior import pandas as pd def search_all(state, country): # Return list of dictionaries, each with a single "match" field return [ {"match": {"country_code": country}}, {"match": {"region_co...
convert.py",line605,infrom_arrowdata=pl.Series._from_arrow(name,data,rechunk=rechunk),^^^File"/Users/swnelson/code/3p/polars/py-polars/polars/series/series.py",line325,in_from_arrowreturncls._from_pyseries(arrow_to_pyseries(name,values,rechunk))^^^File"/Users/swnelson/code/3p/polars...
polars_json::json::write::serialize_to_utf8(arr.as_ref()) }); Ok(StringChunked::from_chunk_iter(ca.name(),iter).into_series()) } and changelet ca = s.struct_()?;tolet ca = s.list()?; But perhaps someone can answer if this should be implemented asExpr.json_encode()instead?
Row-wise construction would convert to the given time zone, while column-wise construction would _replace_ the time zone. The inconsistency has been fixed by always converting to the time zone specified in the data type. **Example** Before: ```pycon >>> from datetime import datetime >>>...