I am trying to make a submission of a machine learning classification problem. I have a test dataset where to try my model. To submit I have to build a csv file. The prblem is that when I go building this csv file by doing:
sub = pd.DataFrame({'instructions': test['instructions'],'compiler':new_pred_class}).to_csv('sub.csv')
sub.head()
I get the following error message:
AttributeError Traceback (most recent call last)
<ipython-input-37-f223adaf5068> in <module>
1 sub = pd.DataFrame({'instructions': test['instructions'],'compiler':new_pred_class}).to_csv('sub.csv')
----> 2 sub.head()
AttributeError: 'NoneType' object has no attribute 'head'
Can somebody please help me? Thank's in advance.