polars_time/chunkedarray/
mod.rs
1#[cfg(feature = "dtype-date")]
3mod date;
4#[cfg(feature = "dtype-datetime")]
5mod datetime;
6#[cfg(feature = "dtype-duration")]
7mod duration;
8mod kernels;
9#[cfg(any(feature = "rolling_window", feature = "rolling_window_by"))]
10mod rolling_window;
11pub mod string;
12#[cfg(feature = "dtype-time")]
13mod time;
14
15use arrow::legacy::utils::CustomIterTools;
16use chrono::{NaiveDate, NaiveDateTime, NaiveTime};
17#[cfg(feature = "dtype-date")]
18pub use date::DateMethods;
19#[cfg(feature = "dtype-datetime")]
20pub use datetime::DatetimeMethods;
21#[cfg(feature = "dtype-duration")]
22pub use duration::DurationMethods;
23use kernels::*;
24use polars_core::prelude::*;
25#[cfg(any(feature = "rolling_window", feature = "rolling_window_by"))]
26pub use rolling_window::*;
27pub use string::StringMethods;
28#[cfg(feature = "dtype-time")]
29pub use time::TimeMethods;
30
31#[cfg(any(feature = "dtype-date", feature = "dtype-datetime"))]
33pub(crate) fn months_to_quarters(mut ca: Int8Chunked) -> Int8Chunked {
34 ca.apply_mut(|month| (month + 2) / 3);
35 ca
36}