Prevent pyspark to serialize whole object