python - Drop row where integer column equals value fails -


i have dataframe datatypes are:-

> dfg.dtypes  std      float64 label     object count      int64 dtype: object 

but when try drop columns count=1 following error:- can explain? thanks

> dfg = dfg[dfg.count != 1]  --------------------------------------------------------------------------- keyerror                                  traceback (most recent call last) c:\anaconda3\lib\site-packages\pandas\indexes\base.py in get_loc(self, key, method, tolerance)    1944             try: -> 1945                 return self._engine.get_loc(key)    1946             except keyerror:  pandas\index.pyx in pandas.index.indexengine.get_loc (pandas\index.c:4154)() 

etc.

it turns out there's problem naming column "count". if change column name "mycount" works fine. sorry bother you!


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -