Skip to content

Instantly share code, notes, and snippets.

@douglaspsteen
Created August 16, 2020 02:45
Show Gist options
  • Save douglaspsteen/18bed8360e6713ffa8bc24fb898cfeb4 to your computer and use it in GitHub Desktop.
Save douglaspsteen/18bed8360e6713ffa8bc24fb898cfeb4 to your computer and use it in GitHub Desktop.
# Define X and y
X = df.drop('y', axis=1)
y = df.y
# Loop to select random columns to be used in classifier
random_cols = []
for i in range(4):
rand_col = 'X' + str(random.randint(1,178))
random_cols.append(rand_col)
print(random_cols)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment