用德语月份名称解析日期

时间:2018-08-16 13:56:21

标签: python date format translation

我尝试读取德语月份(例如“ Mai”等)的csv文件。 当我尝试:proddata = {"Age":[65,50,37], "BMI":["25-29","35-39","30-35"], "BP":["<140/90",">140/90",">140/90"]} prod_df = pd.DataFrame(proddata) def encoder_prod(columns): for i in columns: prod_df.iloc[:, i] = labelencoder.fit_transform(prod_df.iloc[:, i]) encoder_prod([1,2]) enc = joblib.load("encoder.pkl") prod_df = enc.transform(prod_df).toarray() predictions = model.predict(prod_df) results = [round(val) for val in predictions] 时会导致

datetime.date.strptime('Mai 2009','%B %Y'))

默认语言环境“ de_DE”

有简单的翻译解决方案吗?

0 个答案:

没有答案