小编Woj*_*ski的帖子

如何使用条件填充数据?

我有这样的问题:DataFrame 为此:http ://sigmaquality.pl/wp-content/uploads/2019/03/sample.csv

在此处输入图片说明

我有两列:邮政编码和国家代码。我在列中有许多空单元格:国家代码。

我知道邮政编码是否有掩码,XX-XXX这是波兰代码。因为我知道,我可以通过符号填充空单元格:'PL'。我不知道该怎么做。

如何使用条件填充数据?

python dataframe pandas

1
推荐指数
2
解决办法
69
查看次数

转换为“日期时间”类型的问题:“小时必须在 0..23”

这些是我的 csv 文件中的一些示例行:

10/10/1949 20:30,san marcos,tx,us,cylinder,2700,45 minutes,"This event took place in early fall around 1949-50. It occurred after a Boy Scout meeting in the Baptist Church. The Baptist Church sit",4/27/2004,29.8830556,-97.9411111
10/10/1949 21:00,lackland afb,tx,,light,7200,1-2 hrs,"1949 Lackland AFB&#44 TX.  Lights racing across the sky & making 90 degree turns on a dime.",12/16/2005,29.38421,-98.581082
10/10/1955 17:00,chester (uk/england),,gb,circle,20,20 seconds,"Green/Orange circular disc over Chester&#44 England",1/21/2008,53.2,-2.916667
10/10/1956 21:00,edna,tx,us,circle,20,1/2 hour,"My older brother and twin sister were leaving the only Edna theater at about 9 PM&#44...we had our bikes …
Run Code Online (Sandbox Code Playgroud)

python datetime dataframe pandas

0
推荐指数
1
解决办法
2883
查看次数

标签 统计

dataframe ×2

pandas ×2

python ×2

datetime ×1