Skip to content

Instantly share code, notes, and snippets.

@ayazzali
Last active September 20, 2018 13:11
Show Gist options
  • Save ayazzali/bf89869c04b8a611c380b3b9437586e8 to your computer and use it in GitHub Desktop.
Save ayazzali/bf89869c04b8a611c380b3b9437586e8 to your computer and use it in GitHub Desktop.

for install apache-beam

  • conda create -n py27 python=2.7 ipykernel
  • conda activate py27
p=beam.Pipeline();
(p
|'Create' >> beam.io.ReadFromText("some.txt",'a')
#|'Create' >> beam.Create(["1", "2", "3"])
|'func'>> beam.FlatMap(lambda q: myFunc(q))
|'Out' >> beam.io.WriteToText("res0.txt",'a')
)
p.run()
@ayazzali
Copy link
Author

ayazzali commented Sep 20, 2018

чтоб дата быстрее парсилась
ir=pd.read_csv(path,nrows=nrows,date_parser=lambda x:datetime.datetime.strptime(x,'%Y-%m-%d %H:%M:%S %Z'))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment