![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
pandas
ksx_120999
江湖问路不问心,问心问得几路行。
展开
-
C:\Python27\lib\site-packages\pandas\core\series.py:1828: RuntimeWarning: invalid value encountered
C:\Python27\lib\site-packages\pandas\core\series.py:1828: RuntimeWarning: invalid value encountered in rint result = com._values_from_object(self).round(decimals)使用 pandas 对表进行指定小数位操作时DataFram...原创 2019-01-10 18:19:44 · 1861 阅读 · 0 评论 -
ValueError: You are trying to merge on object and float64 columns. If you wish to proceed you should
两个列表的其中一列值分别是左表:lk ['' '' '' '' '' '' '' '' '' '' '' '' '' ''], 类型是 <type 'str'>右表:rk [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.], 类型是 <type 'numpy.float64'>,--------类型...原创 2019-01-07 16:05:56 · 13077 阅读 · 0 评论 -
pandas ValueError: cannot reindex from a duplicate axis
对表格进行操作时,会出现报错:ValueError: cannot reindex from a duplicate axis说明 文件表格里面的列名有重复的,对其中一个进行重命名或者删除,即可。原创 2019-01-08 10:30:45 · 22680 阅读 · 0 评论 -
pandas 屏蔽 SettingWithCopyWarning A value is trying to be set on a copy of a slice from a DataFrame
http://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html添加如下一行代码:# 不提示警告pd.set_option('mode.chained_assignment', None)# !/usr/bin/env python # -*- coding:utf-8 -*-import p...原创 2019-04-11 18:33:44 · 2006 阅读 · 0 评论 -
sqlalchemy.exc.InvalidRequestError: Could not reflect: requested table(s) not available in Engine
pandas的DataFrame数据,使用df.to_sql接口时,from sqlalchemy import create_engine# 使用SQLAlcheymy的ORM框架,链接数据库engine = create_engine( "mysql+pymysql://%s:%s@%s:%s/%s?charset=utf8" % ("user", "...原创 2019-05-10 10:17:15 · 7901 阅读 · 2 评论