Home
Sign Up
Sign In
推荐学习书目
›
Learn Python the Hard Way
Python Sites
›
PyPI
- Python Package Index
›
http://diveintopython.org/toc/index.html
›
Pocoo
值得关注的项目
›
PyPy
›
Celery
›
Jinja2
›
Read the Docs
›
gevent
›
pyenv
›
virtualenv
›
Stackless Python
›
Beautiful Soup
›
结巴中文分词
›
Green Unicorn
›
Sentry
›
Shovel
›
Pyflakes
›
pytest
Python 编程
›
pep8 Checker
Styles
›
PEP 8
›
Google Python Style Guide
›
Code Style from The Hitchhiker's Guide
V2EX
›
Python
pandas 里面的 none 怎么向前填充
zcsnbb
·
Oct 19, 2018
· 2287 views
This topic created in 2903 days ago, the information mentioned may be changed or developed.
使用过这个 df.fillna(method="pad") 但是没有奏效,是因为不是 nan 吗?
NaN
pandas
none
method
3 replies
•
2018-10-22 11:34:14 +08:00
1
Les1ie
Oct 20, 2018
df.fillna("something", inplace=True)
2
zcsnbb
OP
Oct 22, 2018
@
Les1ie
尝试过了 但是失败了
3
Les1ie
Oct 22, 2018
加了 inplace=True 才会替换当前变量,没加的会返回一个新的对象,
所以你的问题是这个地方不是 NaN 么.., 不过我遇到的空值都是 NaN 呀..
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Privacy
·
Solana
·
2823 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 30ms ·
UTC 10:32
·
PVG 18:32
·
LAX 03:32
·
JFK 06:32
♥ Do have faith in what you're doing.
❯