Skip to content

Instantly share code, notes, and snippets.

@canimus
Created January 4, 2021 09:41
Show Gist options
  • Select an option

  • Save canimus/364eb2fb976fc941fac838541c2337ff to your computer and use it in GitHub Desktop.

Select an option

Save canimus/364eb2fb976fc941fac838541c2337ff to your computer and use it in GitHub Desktop.
PySpark Union JSON
df = reduce(lambda a,b: a.union(b), [spark.read.json(f'{x}/*result.json') for x in range(195, 202)])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment