Hello, I'm a beginnr and I need help in the Map steps to dates
please help it's urgent!!
please help it's urgent!!
train = pd.read_csv('Train.csv') print(train.shape) train.head() test = pd.read_csv('Test.csv') print(test.shape) test.head() ss = pd.read_csv('SampleSubmission.csv') print(ss.shape) ss.head() def process(train,test,ss) : target_mapper = dict(zip(ss.drop('ID',1).columns.tolist(), [i for i in range(len(ss.drop('ID',1).columns.tolist()))])) # Used to Encode Train Target train['Target'] = train['Target'].map(target_mapper) Inversetarget_mapper = dict(zip([i for i in range(len(ss.drop('ID',1).columns.tolist()))], ss.drop('ID',1).columns.tolist())) # Used to Create submission file in_cols = train.filter(like='timestep1_').columns.tolist() # features used in Training, we will use only time step 1 in this tutorial return target_mapper , Inversetarget_mapper , in_cols , train , test , ss
Larz60+ write Apr-23-2022, 01:29 AM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Fixed for you this time. Please use BBCode tags on future posts.
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Fixed for you this time. Please use BBCode tags on future posts.