shape: (5, 2)
Day | Collins Score |
---|---|
str | i64 |
"Mon" | 1 |
"Tue" | 2 |
"Wed" | -1 |
"Thu" | 0 |
"Fri" | -2 |
neg
Joram Mutenge
2025-10-08
You want to understand what makes your life better, so you start assigning a Collins score to each day to gain insights from your high-scoring days. However, after five entries, you realize that your numbers are reversed. The positive values should be negative, and the negative ones should be positive.
If you’ve never heard of the Collins score, stop reading this right now and google it. More importantly, google the man behind it Jim Collins.
Below is a dataframe showing your entries.
Day | Collins Score |
---|---|
str | i64 |
"Mon" | 1 |
"Tue" | 2 |
"Wed" | -1 |
"Thu" | 0 |
"Fri" | -2 |
To swap the signs of the values in the dataframe above, use the Polars expression neg
as shown below:
Day | Collins Score |
---|---|
str | i64 |
"Mon" | -1 |
"Tue" | -2 |
"Wed" | 1 |
"Thu" | 0 |
"Fri" | 2 |
Enroll in my Polars course to learn more!