Skip to content

Instantly share code, notes, and snippets.

@neuromaancer
Last active April 30, 2022 13:50
Show Gist options
  • Save neuromaancer/e34daf99f45099d02b64a8cc29052f28 to your computer and use it in GitHub Desktop.
Save neuromaancer/e34daf99f45099d02b64a8cc29052f28 to your computer and use it in GitHub Desktop.
DF_operations
# add row
scores = list()
for row in df.itemrows():
df.loc[len(df)] = scores
def get_data(data, features):
"""
Data is an array each row being a tuple with possibily several features.
Keep only those features whose indices appear in the 'features' vector
"""
return data[:,features]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment