pub trait TemporalMethods: AsSeries {
Show 19 methods
// Provided methods
fn hour(&self) -> Result<ChunkedArray<Int8Type>, PolarsError> { ... }
fn minute(&self) -> Result<ChunkedArray<Int8Type>, PolarsError> { ... }
fn second(&self) -> Result<ChunkedArray<Int8Type>, PolarsError> { ... }
fn nanosecond(&self) -> Result<ChunkedArray<Int32Type>, PolarsError> { ... }
fn day(&self) -> Result<ChunkedArray<Int8Type>, PolarsError> { ... }
fn weekday(&self) -> Result<ChunkedArray<Int8Type>, PolarsError> { ... }
fn week(&self) -> Result<ChunkedArray<Int8Type>, PolarsError> { ... }
fn ordinal_day(&self) -> Result<ChunkedArray<Int16Type>, PolarsError> { ... }
fn millennium(&self) -> Result<ChunkedArray<Int32Type>, PolarsError> { ... }
fn century(&self) -> Result<ChunkedArray<Int32Type>, PolarsError> { ... }
fn year(&self) -> Result<ChunkedArray<Int32Type>, PolarsError> { ... }
fn iso_year(&self) -> Result<ChunkedArray<Int32Type>, PolarsError> { ... }
fn ordinal_year(&self) -> Result<ChunkedArray<Int32Type>, PolarsError> { ... }
fn is_leap_year(&self) -> Result<ChunkedArray<BooleanType>, PolarsError> { ... }
fn quarter(&self) -> Result<ChunkedArray<Int8Type>, PolarsError> { ... }
fn month(&self) -> Result<ChunkedArray<Int8Type>, PolarsError> { ... }
fn to_string(&self, format: &str) -> Result<Series, PolarsError> { ... }
fn strftime(&self, format: &str) -> Result<Series, PolarsError> { ... }
fn timestamp(
&self,
tu: TimeUnit,
) -> Result<ChunkedArray<Int64Type>, PolarsError> { ... }
}
temporal
only.Provided Methods§
Sourcefn hour(&self) -> Result<ChunkedArray<Int8Type>, PolarsError>
fn hour(&self) -> Result<ChunkedArray<Int8Type>, PolarsError>
Extract hour from underlying NaiveDateTime representation. Returns the hour number from 0 to 23.
Sourcefn minute(&self) -> Result<ChunkedArray<Int8Type>, PolarsError>
fn minute(&self) -> Result<ChunkedArray<Int8Type>, PolarsError>
Extract minute from underlying NaiveDateTime representation. Returns the minute number from 0 to 59.
Sourcefn second(&self) -> Result<ChunkedArray<Int8Type>, PolarsError>
fn second(&self) -> Result<ChunkedArray<Int8Type>, PolarsError>
Extract second from underlying NaiveDateTime representation. Returns the second number from 0 to 59.
Sourcefn nanosecond(&self) -> Result<ChunkedArray<Int32Type>, PolarsError>
fn nanosecond(&self) -> Result<ChunkedArray<Int32Type>, PolarsError>
Returns the number of nanoseconds since the whole non-leap second. The range from 1,000,000,000 to 1,999,999,999 represents the leap second.
Sourcefn day(&self) -> Result<ChunkedArray<Int8Type>, PolarsError>
fn day(&self) -> Result<ChunkedArray<Int8Type>, PolarsError>
Extract day from underlying NaiveDateTime representation. Returns the day of month starting from 1.
The return value ranges from 1 to 31. (The last day of month differs by months.)
Sourcefn weekday(&self) -> Result<ChunkedArray<Int8Type>, PolarsError>
fn weekday(&self) -> Result<ChunkedArray<Int8Type>, PolarsError>
Returns the ISO weekday number where monday = 1 and sunday = 7
Sourcefn week(&self) -> Result<ChunkedArray<Int8Type>, PolarsError>
fn week(&self) -> Result<ChunkedArray<Int8Type>, PolarsError>
Returns the ISO week number starting from 1. The return value ranges from 1 to 53. (The last week of year differs by years.)
Sourcefn ordinal_day(&self) -> Result<ChunkedArray<Int16Type>, PolarsError>
fn ordinal_day(&self) -> Result<ChunkedArray<Int16Type>, PolarsError>
Returns the day of year starting from 1.
The return value ranges from 1 to 366. (The last day of year differs by years.)
Sourcefn millennium(&self) -> Result<ChunkedArray<Int32Type>, PolarsError>
fn millennium(&self) -> Result<ChunkedArray<Int32Type>, PolarsError>
Calculate the millennium from the underlying NaiveDateTime representation.
Sourcefn century(&self) -> Result<ChunkedArray<Int32Type>, PolarsError>
fn century(&self) -> Result<ChunkedArray<Int32Type>, PolarsError>
Calculate the millennium from the underlying NaiveDateTime representation.
Sourcefn year(&self) -> Result<ChunkedArray<Int32Type>, PolarsError>
fn year(&self) -> Result<ChunkedArray<Int32Type>, PolarsError>
Extract year from underlying NaiveDateTime representation. Returns the year number in the calendar date.
fn iso_year(&self) -> Result<ChunkedArray<Int32Type>, PolarsError>
Sourcefn ordinal_year(&self) -> Result<ChunkedArray<Int32Type>, PolarsError>
fn ordinal_year(&self) -> Result<ChunkedArray<Int32Type>, PolarsError>
Extract ordinal year from underlying NaiveDateTime representation. Returns the year number in the calendar date.
Sourcefn is_leap_year(&self) -> Result<ChunkedArray<BooleanType>, PolarsError>
fn is_leap_year(&self) -> Result<ChunkedArray<BooleanType>, PolarsError>
Extract year from underlying NaiveDateTime representation. Returns whether the year is a leap year.
Sourcefn quarter(&self) -> Result<ChunkedArray<Int8Type>, PolarsError>
fn quarter(&self) -> Result<ChunkedArray<Int8Type>, PolarsError>
Extract quarter from underlying NaiveDateTime representation. Quarters range from 1 to 4.
Sourcefn month(&self) -> Result<ChunkedArray<Int8Type>, PolarsError>
fn month(&self) -> Result<ChunkedArray<Int8Type>, PolarsError>
Extract month from underlying NaiveDateTime representation. Returns the month number starting from 1.
The return value ranges from 1 to 12.
Sourcefn to_string(&self, format: &str) -> Result<Series, PolarsError>
fn to_string(&self, format: &str) -> Result<Series, PolarsError>
Convert Time into String with the given format. See chrono strftime/strptime.
Sourcefn strftime(&self, format: &str) -> Result<Series, PolarsError>
fn strftime(&self, format: &str) -> Result<Series, PolarsError>
Convert from Time into String with the given format. See chrono strftime/strptime.
Alias for to_string
.
Sourcefn timestamp(
&self,
tu: TimeUnit,
) -> Result<ChunkedArray<Int64Type>, PolarsError>
fn timestamp( &self, tu: TimeUnit, ) -> Result<ChunkedArray<Int64Type>, PolarsError>
Convert date(time) object to timestamp in TimeUnit
.