【发布时间】:2018-11-01 07:29:54
【问题描述】:
我有一个数据集,其中包含许多列,按以下顺序排列:英文名称、国家/地区、濒危程度、发言者数量。
在濒危程度下,有4级易危、绝对濒危、极度濒危和灭绝。
我想将数据集分类到这些类别中并使其成为自己的数据集,仍然将其他数据保留在其他列中
this image has the columns name on it
在 jupyter notebook 上加载我的数据集 - 这是我所知道的
if os.path.isfile("data.csv"):
filepath = "data.csv"
df = pd.read_csv(filepath)
df.head(300)
但我认为代码看起来像这样:
vulnerable = df[]
【问题讨论】:
-
不要将数据帧作为图像发布,作为文本发布。
标签: python pandas jupyter-notebook