Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jay-johnson/23e8ac8a8a575c76eeb04a4c6c6a7bb7 to your computer and use it in GitHub Desktop.
Save jay-johnson/23e8ac8a8a575c76eeb04a4c6c6a7bb7 to your computer and use it in GitHub Desktop.

Revisions

  1. jay-johnson renamed this gist Nov 15, 2022. 1 changed file with 0 additions and 0 deletions.
  2. jay-johnson renamed this gist Nov 15, 2022. 1 changed file with 0 additions and 0 deletions.
  3. jay-johnson renamed this gist Nov 15, 2022. 1 changed file with 0 additions and 0 deletions.
  4. jay-johnson created this gist Nov 15, 2022.
    11 changes: 11 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    let date_utc_str_s: Series = Series::new(
    "date_utc_str",
    df
    .column("date")
    .unwrap()
    .cast(&DataType::Datetime(
    polars::datatypes::TimeUnit::Milliseconds,
    None))
    .unwrap()
    .strftime("%Y-%m-%dT%H:%M:%SZ")
    .unwrap());