Changing Date format with default property

Question:

0

`vectorizer = TfidfVectorizer(analyzer=’word’,norm=None, use_idf=True,smooth_idf=True) tfIdfMat = vectorizer.fit_transform(df[‘Description’]) feature_names = sorted(vectorizer.get_feature_names())

docList=[‘df.Description’] #skDocsTfIdfdf = pd.DataFrame(tfIdfMat.todense(),index=sorted(docList), columns=feature_names) #print(skDocsTfIdfdf)

for col in tfIdfMat.nonzero()[1]: print (feature_names[col], ‘-‘ , tfIdfMat[0, col])`

Asked By: Mr xyz

||

Answers:

I think you can encapsulate a function, return the time in this format, and then replace it datetime.now
Because he is calling this function for you

Answered By: Recar
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.