We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c923a65 commit 2d4c312Copy full SHA for 2d4c312
lectures/polars.md
@@ -781,7 +781,8 @@ for index_col in indices_data.columns:
781
pl.col(index_col).last().alias('last_price')
782
])
783
.with_columns(
784
- ((pl.col('last_price') - pl.col('first_price') + 1e-10) / (pl.col('first_price') + 1e-10)).alias('return')
+ ((pl.col('last_price') - pl.col('first_price') + 1e-10)
785
+ / (pl.col('first_price') + 1e-10)).alias('return')
786
)
787
.with_columns(pl.lit(indices_list[index_col]).alias('index_name'))
788
.select(['year', 'index_name', 'return']))
0 commit comments