Created
May 23, 2020 01:51
-
-
Save roshan-adusumilli/0d938e7d34c39d6e027778b6303a1033 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| import pandas as pd | |
| ca_df = pd.read_csv('ca_labeled.csv', index_col=[0]) | |
| ny_df = pd.read_csv('ny_labeled.csv', index_col=[0]) | |
| tx_df = pd.read_csv('tx_labeled.csv', index_col=[0]) | |
| def features(value): | |
| if(value == -1): | |
| value = 'neg' | |
| return value | |
| elif(value == 1): | |
| value = 'pos' | |
| return value | |
| else: | |
| value = 'neu' | |
| return value | |
| ca_df['values'] = ca_df['values'].apply(features) | |
| ny_df['values'] = ny_df['values'].apply(features) | |
| tx_df['values'] = tx_df['values'].apply(features) | |
| ca_df.head() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment