Created
February 24, 2013 06:17
-
-
Save smly/5022849 to your computer and use it in GitHub Desktop.
DataFrame.ix & DataFrame.merge
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
| # %run ipython/load_df.py | |
| import pandas as pd | |
| df = pd.load('pickle/train_test_tsv2_data_frame.pd.pickle') | |
| fea = pd.load('pickle/actions_feature.pd.pickle') | |
| train = pd.DataFrame(df.ix['train']['UserID'].drop_duplicates()) | |
| train = train.merge(fea) | |
| test = pd.DataFrame(df.ix['test']['UserID'].drop_duplicates()) | |
| test = test.merge(fea) | |
| train_ans = pd.read_csv('data/conv/train.ans.tsv', sep="\t") | |
| clf = ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment