See https://github.com/CamDavidsonPilon/tdigest/blob/master/pyspark_example.py "sc" - I assume is a spark connection