Skip to content

Commit

Permalink
renew examples.time_series
Browse files Browse the repository at this point in the history
  • Loading branch information
linjing-lab committed Sep 22, 2023
1 parent 9db0afd commit 542cd4d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion user_guide/src/examples/time_series/parsing_dates.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import polars as pl
from datetime import datetime

df = pl.read_csv("data/appleStock.csv", parse_dates=True)
df = pl.read_csv("data/appleStock.csv", try_parse_dates=True)

filtered_df = df.filter(
pl.col("Date") == datetime(1995, 10, 16),
Expand Down
2 changes: 1 addition & 1 deletion user_guide/src/examples/time_series/resampling_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

df = pl.DataFrame(
{
"time": pl.date_range(start=datetime(2021, 12, 16), end=datetime(2021, 12, 16, 3), interval="30m"),
"time": pl.date_range(start=datetime(2021, 12, 16), end=datetime(2021, 12, 16, 3), interval="30m", eager=True),
"groups": ["a", "a", "a", "b", "b", "a", "a"],
"values": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0],
}
Expand Down

0 comments on commit 542cd4d

Please sign in to comment.