数字序列预测
# -*- coding: UTF-8 -*-
%matplotlib inline
import pandas as pd
import string
import numpy as np
import matplotlib.pyplot as plt
from sklearn import preprocessing
train = pd.read_csv('train.csv')
test = pd.read_csv('test.csv')
last = test.Sequence.apply(lambda x: pd.Series(x.split(','))).mode(axis=1).fillna(0)
submission = pd.DataFrame({'Id': test['Id'], 'Last': last[0]})
submission.to_csv('mode.csv', index=False)
提交Kaggle之后是0.05680