A monoid has two components:
"make an instance from nothing"
0
(Unit => Int
)""
(Unit => String
)Nil
(Unit => List[_]
)
2020-03-20
On Saturday we wrapped up the Northeast Scala Symposium: a community-run conference related to the Scala programming language.
On Tuesday, having sold 170 tickets to a conference starting Thursday at a venue in DUMBO, we decided to go "online only".
It's possible we should have made the call earlier. As is, some ppl were able to cancel their travel plans, others had already traveled, and (seemingly most) others had canceled on their own (or their employers had done it on their behalf).
#!/usr/bin/env bash | |
python3 gist_dir.py "$@" |
Col1
is the field that will be the "rows" indexCol2
is the column whose values will become the new columnsCol3
is any other column (assuming that other columns are always filled; .count()
will only count cells where Col3
has a value)df \
.groupby(['Col1', 'Col2']) \
[['Col3']] \
.count() \
.reset_index() \
.pivot('Col1', 'Col2', 'Col3')