ccary
Databricks Partner

Can you try passing in the column names as a second argument to the pivot function?

.pivot('C', ["small", "large"])