Enrollment by Gender
Displays gender enrollment information from the database
Last updated
Displays gender enrollment information from the database
Last updated
This command has no input parameters, although does require student information to first be imported:
Once complete, this command:
This the kind of table displayed:
The actual pipeline code that builds the above table is the following:
The above code has a great deal of boilerplate that may make it difficult to read at first, however, the key lines are 7
and 8
. If we format only those two lines, we see some patterns:
Which basically says "extract students whose archived status is False
, then execute a pivot table displaying count, broken down by grade and gender.
The above Python code can be represented directly through mbpy commands as well.
Thus, we can extract the students like this:
It outputs just the first item, with columns down the left side:
Let's check out the help for the pivot command:
So we can see how to build the same command on the command line, formatted with \
: