i=0; col=\'INFANT_ALIVE_AT_REPORT\' agg = categorical_rdd \\ .groupBy(lambda row: row[i])
The output when using print(col,agg.collect())
print(col,agg.collect())