« first day (336 days earlier)    last day (1 day later) » 

4:05 PM
6
Q: Why does PartialEq return a bool, when PartialOrd is more nuanced and returns Option<Ordering>?

Evan CarrollIt seems asymmetric and basic, so I want to understand the reasoning of this, why is that PartialOrd defines partial_cmp, to return Option<Ordering>; fn partial_cmp(&self, other: &Rhs) -> Option<Ordering> {} And PartialEq defines eq to return bool fn eq(&self, other: &Rhs) -> bool {} Why doesn'...

 
4:23 PM
6
Q: Access callee/this in Raku map code/block

mykhalIs it possible to access the "callee" ("this") in Raku map code block and/or whatevercode? E.g. if one wanted to calculate arithmetic mean my $data = <1 10 0 7 2> ; say $data.sum / $data ; # or @$data, same as $data.elems in this numeric context # OUTPUT: «4␤» by sum of fractions say $data.m...

 
 
4 hours later…
8:05 PM
6
Q: Remove duplicate element within a row in a specific column

chippycentraI have a dataframe such as ; COL1 COL2 A,A,A 2 B 1 C,C 4 D,D,D 1 A 4 F 2 C,C 1 And I would like to first remove duplicate within COL1 and get: COL1 COL2 A 2 B 1 C 4 D 1 A 4 F 2 C 1 and then sum the same COL1 letter by the COL2 values and get : COL...

 

« first day (336 days earlier)    last day (1 day later) »