我让它工作了一次,但没有保存文件和丢失的代码。 请帮忙。你知道吗
import pandas as pd
import nltk
df0.head(4)
# X Y month day FFMC DMC DC
# 0 7 5 mar fri 86.2 26.2 94.3
# 1 7 4 oct tue 90.6 35.4 669.1
monthdict={'jan':1,'feb':2'mar':3,'oct':10,'nov':11,'dec':12}
def month2num(month):
return monthdict[month]
df0['month'] = df0['month'].apply(month2num)
df0.head()
'注释' 我不是那么聪明,只是刚刚开始,所以请有人用英语解释解决方案。你知道吗
以下打印错误:
# KeyError
# Traceback
# (most recent call last)
# <ipython-input-48-566f3675aaed> in <module>()
# def month2num(month):
# return monthdict[month]
# ----> df0['month'] = df['month'].apply(month2num)
# df0.head()
# 1 frames
# pandas/_libs/lib.pyx in pandas._libs.lib.map_infer()
# <ipython-input-48-566f3675aaed> in month2num(month)
#
# def month2num(month):
# ----> return monthdict[month]
# df0['month'] = df['month'].apply(month2num)
# df0.head()
# KeyError: 'apr'
即使使用remote debugging attached,在生产环境中运行应用服务器(Tomcat)也没有问题
更新
如果你想在应用程序中执行自定义代码,那么一个解决方案是编写一个类并编译它,将其存储在服务器上的某个位置,然后在应用程序中执行如下方法:
我不明白这个问题,你只想连接到远程虚拟机吗?连接后,您可以执行任何您想要的操作,事件终止VM。 您必须在调试模式下启动VM:
-Xdebug-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
然后以Eclipse为例,创建一个新的远程应用程序概要文件。检查一下: http://www.ibm.com/developerworks/opensource/library/os-eclipse-javadebug/index.html
我找到了实验解决方案:jsadebugd
然后你可以通过太阳来连接它。jvm。热点。杰迪。SAPIDAttachingConnector连接器
相关问题 更多 >
编程相关推荐