python - Why can't I mask this pandas dataframe column? -
I do not know why the following code is not working I am trying to mask Pandya arrays like my advisor , But I do not care what I'm doing. Am I mixing pandas dataframe in some way with numpy arrays? I saw how to do this in another thread and I feel like this.
I get this output :
0 Alamma 1 Otago County 2 Baldwin County 3 Barbour County 4 Bib County 5 Blount County 6 Bullock County 7 Butler County 8 Calhau County 9 Chambers County T 10 Cherokee County 11 Chileton County 12 Chota County County 13 Clark County 14 Clay County ... 3178 Hot Springs County 3179 Johnson County 3180 Laramie County 3181 Lincoln County 3182 Natalia County 3183 Neobra County 3184 Park County 3185 Plat County 3186 Sheridan County 3187 Sublette County 3188 Sweetwater County 3189 Teton County 3190 Utd County 3191 Washy County 3192 Weston County Name: County_Name, Length: 3193, DTP: Object Tresb In the (most recent call last): File "/ user / AV / desktop / County / Deta_anlaijeshn average income", line 13, in & lt; Module & gt; Print earnings County_name [str (income count_name) .isupper ()] file "/ user / avi / encondda / lib / python2 / site / package / punds / core / series", line 479, __getitem__ result = self.index. Get_value return self._engine.get_value (s, k) file "get_value" (self, key) file "/ user / avi / naconda / lib / python 2.7 / site-package / punds / core / index", line 1171, "index .px "in line 97, in pandas.index.IndexEngine.get_value (panda / index: 2987) file" index.pyx ", line 105, pandas.index.indexEngine.get_value (panda / index: 2802). Il "index.pyx", in line 146, Pandas.index.inxengine.get_lock (panda / index: 3495) file "index.pyx", line 357, panday. In the index .int64Engine._check_type (punds / index.c: 6813) Keyyer: incorrect [expired in exit 1.4 with exit code 1] [shell_cmd: python -u "/ user / avi / desktop / average income by county / Data_alalis ""] [DIR: / user / avi / desktop / county by average income] [path: / uir / bin: / bin: / uir / sbi: / sbn]
Try it out:
Revenue [ReciprocalisationEfile (lambda x: x.isupper ( ))! = True]
You can not use str ()
on all dataframes - (next time use the income. Country_Name.str
)
But to make a simple solution, earn.space_name.strat.supuper ()
.
Comments
Post a Comment