Skip to content

Instantly share code, notes, and snippets.

@roshan-adusumilli
Created May 23, 2020 04:21
Show Gist options
  • Select an option

  • Save roshan-adusumilli/693576da581200123b83600ec4439423 to your computer and use it in GitHub Desktop.

Select an option

Save roshan-adusumilli/693576da581200123b83600ec4439423 to your computer and use it in GitHub Desktop.
import random
dataset = []
ca_dataset = []
for row in ca_df.itertuples(index = False):
ca_dataset.append((getattr(row, 'tweet_text'), getattr(row, 'values')))
ny_dataset = []
for row in ny_df.itertuples(index = False):
ny_dataset.append((getattr(row, 'tweet_text'), getattr(row, 'values')))
tx_dataset = []
for row in tx_df.itertuples(index = False):
tx_dataset.append((getattr(row, 'tweet_text'), getattr(row, 'values')))
dataset = ca_dataset + ny_dataset + tx_dataset
random.shuffle(dataset)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment