Last active
April 30, 2022 13:50
-
-
Save neuromaancer/e34daf99f45099d02b64a8cc29052f28 to your computer and use it in GitHub Desktop.
DF_operations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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