Created
November 4, 2019 10:03
-
-
Save filipwodnicki/c14ad3c45ce9aa0fa054c84ff1adec57 to your computer and use it in GitHub Desktop.
Pandas cheatsheet
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
# 1. Apply works with multiple arguments | |
## instead of this | |
binary_test["prediction"] = binary_test["sentence"].apply(lambda x: get_prediction(x, PROJECT_ID, BINARY_MODEL_ID)) | |
## do this | |
binary_test["prediction"] = binary_test["sentence"].apply(get_predictions, project_id=PROJECT_ID, model_id=BINARY_MODEL_ID |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment