Skip to content

Instantly share code, notes, and snippets.

{"caused_by":"macos","macos_version":"Mac OS X 10.14.6 (18G84)","os_version":"Bridge OS 3.6 (16P6568)","macos_system_state":"running","incident_id":"CF2B4DC4-D914-4411-96D8-315C3C2B94F0","timestamp":"2019-07-23 15:27:42.27 +0000","bug_type":"210"}
{
"binaryImages" : [
[
"db4e28e6-3544-62e8-adc4-12a804eb32e1",
18446743936270598144,
"U"
],
[
"00000000-0000-0000-0000-000000000000",
{"caused_by":"macos","macos_version":"Mac OS X 10.14.6 (18G84)","os_version":"Bridge OS 3.6 (16P6568)","macos_system_state":"running","incident_id":"CF2B4DC4-D914-4411-96D8-315C3C2B94F0","timestamp":"2019-07-23 15:27:42.27 +0000","bug_type":"210"}
{
"binaryImages" : [
[
"db4e28e6-3544-62e8-adc4-12a804eb32e1",
18446743936270598144,
"U"
],
[
"00000000-0000-0000-0000-000000000000",
@zaloogarcia
zaloogarcia / pandas_to_spark.py
Last active April 19, 2022 16:20
Script for converting Pandas DF to Spark's DF
from pyspark.sql.types import *
# Auxiliar functions
# Pandas Types -> Sparks Types
def equivalent_type(f):
if f == 'datetime64[ns]': return DateType()
elif f == 'int64': return LongType()
elif f == 'int32': return IntegerType()
elif f == 'float64': return FloatType()
else: return StringType()