Hi, everyone!
I am happy to a part of this great community.
I am a data enthusiast from Nigeria.
Hi!
Iām John, in Scotland.
I suspect that I might be at the āolderā end of the spectrum of new Python users (I was 54 earlier this year
): I have used SAS since 1999 but have finally (some might say, ridiculously late) seen the way in which the wind is blowing and have become a Python enthusiast.
With the way my adult life has worked out, I didnāt get the opportunity to finish university at the same time as my peer group through a combination of family illness, work and sheer stubbornness on my part. Iāve worked through a number of online MOOCs and this has sufficiently engaged me to apply for admission to a university MSc course in data science and artificial intelligence, as a precursor to a personal-passion-project which Iām hoping to do a PhD in, which is an āunusualā application of Bayesian search.
Any questions, please, do, feel free to message me.
Hello Dear Community Members,
I am Umer Alvi Learning Jupyter Notebook, I am at beginner level right now.
I am having issue while working with Pandas exercise
If any member can help me resolve this issue? I can share the Notebook as well if you want?
CustID_grouped.mean()
got error msg
![]()
TypeError Traceback (most recent call last)
File ~\anaconda3\Lib\site-packages\pandas\core\groupby\groupby.py:1942, in GroupBy._agg_py_fallback(self, how, values, ndim, alt)
1941 try:
ā 1942 res_values = self._grouper.agg_series(ser, alt, preserve_dtype=True)
1943 except Exception as err:
File ~\anaconda3\Lib\site-packages\pandas\core\groupby\ops.py:864, in BaseGrouper.agg_series(self, obj, func, preserve_dtype)
862 preserve_dtype = True
ā 864 result = self._aggregate_series_pure_python(obj, func)
866 npvalues = lib.maybe_convert_objects(result, try_float=False)
File ~\anaconda3\Lib\site-packages\pandas\core\groupby\ops.py:885, in BaseGrouper._aggregate_series_pure_python(self, obj, func)
884 for i, group in enumerate(splitter):
ā 885 res = func(group)
886 res = extract_result(res)
File ~\anaconda3\Lib\site-packages\pandas\core\groupby\groupby.py:2454, in GroupBy.mean..(x)
2451 else:
2452 result = self._cython_agg_general(
2453 āmeanā,
ā 2454 alt=lambda x: Series(x, copy=False).mean(numeric_only=numeric_only),
2455 numeric_only=numeric_only,
2456 )
2457 return result.finalize(self.obj, method=āgroupbyā)
File ~\anaconda3\Lib\site-packages\pandas\core\series.py:6540, in Series.mean(self, axis, skipna, numeric_only, **kwargs)
6532 @doc(make_doc(āmeanā, ndim=1))
6533 def mean(
6534 self,
(ā¦)
6538 **kwargs,
6539 ):
ā 6540 return NDFrame.mean(self, axis, skipna, numeric_only, **kwargs)
File ~\anaconda3\Lib\site-packages\pandas\core\generic.py:12417, in NDFrame.mean(self, axis, skipna, numeric_only, **kwargs)
12410 def mean(
12411 self,
12412 axis: Axis | None = 0,
(ā¦)
12415 **kwargs,
12416 ) ā Series | float:
12417 return self._stat_function(
12418 āmeanā, nanops.nanmean, axis, skipna, numeric_only, **kwargs
12419 )
File ~\anaconda3\Lib\site-packages\pandas\core\generic.py:12374, in NDFrame._stat_function(self, name, func, axis, skipna, numeric_only, **kwargs)
12372 validate_bool_kwarg(skipna, āskipnaā, none_allowed=False)
12374 return self._reduce(
12375 func, name=name, axis=axis, skipna=skipna, numeric_only=numeric_only
12376 )
File ~\anaconda3\Lib\site-packages\pandas\core\series.py:6448, in Series._reduce(self, op, name, axis, skipna, numeric_only, filter_type, **kwds)
6444 raise TypeError(
6445 f"Series.{name} does not allow {kwd_name}={numeric_only} "
6446 āwith non-numeric dtypes.ā
6447 )
ā 6448 return op(delegate, skipna=skipna, **kwds)
File ~\anaconda3\Lib\site-packages\pandas\core\nanops.py:147, in bottleneck_switch.call..f(values, axis, skipna, **kwds)
146 else:
ā 147 result = alt(values, axis=axis, skipna=skipna, **kwds)
149 return result
File ~\anaconda3\Lib\site-packages\pandas\core\nanops.py:404, in _datetimelike_compat..new_func(values, axis, skipna, mask, **kwargs)
402 mask = isna(values)
ā 404 result = func(values, axis=axis, skipna=skipna, mask=mask, **kwargs)
406 if datetimelike:
File ~\anaconda3\Lib\site-packages\pandas\core\nanops.py:720, in nanmean(values, axis, skipna, mask)
719 the_sum = values.sum(axis, dtype=dtype_sum)
ā 720 the_sum = _ensure_numeric(the_sum)
722 if axis is not None and getattr(the_sum, āndimā, False):
File ~\anaconda3\Lib\site-packages\pandas\core\nanops.py:1701, in _ensure_numeric(x)
1699 if isinstance(x, str):
1700 # GH#44008, GH#36703 avoid casting e.g. strings to numeric
ā 1701 raise TypeError(f"Could not convert string ā{x}ā to numeric")
1702 try:
TypeError: Could not convert string āUIPatDatRobā to numeric
The above exception was the direct cause of the following exception:
TypeError Traceback (most recent call last)
Cell In[97], line 1
----> 1 CustID_grouped.mean()
File ~\anaconda3\Lib\site-packages\pandas\core\groupby\groupby.py:2452, in GroupBy.mean(self, numeric_only, engine, engine_kwargs)
2445 return self._numba_agg_general(
2446 grouped_mean,
2447 executor.float_dtype_mapping,
2448 engine_kwargs,
2449 min_periods=0,
2450 )
2451 else:
ā 2452 result = self._cython_agg_general(
2453 āmeanā,
2454 alt=lambda x: Series(x, copy=False).mean(numeric_only=numeric_only),
2455 numeric_only=numeric_only,
2456 )
2457 return result.finalize(self.obj, method=āgroupbyā)
File ~\anaconda3\Lib\site-packages\pandas\core\groupby\groupby.py:1998, in GroupBy._cython_agg_general(self, how, alt, numeric_only, min_count, **kwargs)
1995 result = self._agg_py_fallback(how, values, ndim=data.ndim, alt=alt)
1996 return result
ā 1998 new_mgr = data.grouped_reduce(array_func)
1999 res = self._wrap_agged_manager(new_mgr)
2000 if how in [āidxminā, āidxmaxā]:
File ~\anaconda3\Lib\site-packages\pandas\core\internals\managers.py:1469, in BlockManager.grouped_reduce(self, func)
1465 if blk.is_object:
1466 # split on object-dtype blocks bc some columns may raise
1467 # while others do not.
1468 for sb in blk._split():
ā 1469 applied = sb.apply(func)
1470 result_blocks = extend_blocks(applied, result_blocks)
1471 else:
File ~\anaconda3\Lib\site-packages\pandas\core\internals\blocks.py:393, in Block.apply(self, func, **kwargs)
387 @final
388 def apply(self, func, **kwargs) ā list[Block]:
389 āā"
390 apply the function to my values; return a block if we are not
391 one
392 āā"
ā 393 result = func(self.values, **kwargs)
395 result = maybe_coerce_values(result)
396 return self._split_op_result(result)
File ~\anaconda3\Lib\site-packages\pandas\core\groupby\groupby.py:1995, in GroupBy._cython_agg_general..array_func(values)
1992 return result
1994 assert alt is not None
ā 1995 result = self._agg_py_fallback(how, values, ndim=data.ndim, alt=alt)
1996 return result
File ~\anaconda3\Lib\site-packages\pandas\core\groupby\groupby.py:1946, in GroupBy._agg_py_fallback(self, how, values, ndim, alt)
1944 msg = f"agg function failed [how->{how},dtype->{ser.dtype}]"
1945 # preserve the kind of exception that raised
ā 1946 raise type(err)(msg) from err
1948 if ser.dtype == object:
1949 res_values = res_values.astype(object, copy=False)
TypeError: agg function failed [how->mean,dtype->object]
Hiya!
I am Walid, a computational engineer at St. Jude. Been a long time user of all Jupyter products, and am very excited to join the discourse. Hoping to get into contributing at some point. ![]()
Nice to meet folks!
Hello. My name is Dawit. I feel happy joining this interesting community.
Hi! My name is Jiayi. I am a senior CS undergrad at UC Berkeley. I have been using Jupyter Lab for years is would love to know how it works behind then scene and maybe also make some contribution to it.
Hi there, I am Eduardo. I am moving from MATLAB to Python, and Jupyter Notebooks are helping me with the process.
Hi everyone, Iām Alex. I work at Scanner.dev a lightning fast search engine and api for logs in cloud storage. We have a new beta project the allows security teams to use Jupyter Notebooks for Threat Hunting and Response.
You can learn more about the project here if youāre curious: Jupyter Notebooks | SCANNER
Excited to learn more from everyone!
Hi everyone,
I am Clement and im studying computer science at a bachelorās degree level (last year).
With an international friend we would like to make a small contribution within a week and a half for the university, and weād love to have some recommendations for issues we could look into.
If you have any advice for us feel free to contact me !
Nice to meet you all !
Hi everyone,
Actually have been part of this community for a year now, but Iāve never introduced myself. Iām Thibaut and Iāve used Jupyterlab extensively throughout my career. I now work on a visual ETL pipeline editor which is available as a Jupyterlab extension for those interested.
Hi all,
Nameās Florian, I tend to go by Zersiax on the web. I guess I could describe myself as a fully blind (yes really 100% fully no vision blind) developer, accessibility expert and content creator.
I build stuff, I make sure stuffās accessible and I teach others to essentially do both of those things and more, when I can. I try to primarily do that through Twitch and Youtube streams.
Given my next deep dive will be on Jupyter notebooks and friends, I decided to come say hi ![]()
Hi. Iām AndrĆ©s. Iām student of economy at UNFV (PerĆŗ) . My purpose with Jupyter is learn about How does data science work and how can it be automated? I hope to learn something of this and not die tryng.
Thank you so much to all the jupyter team!
Hi, iām a non-employed bit of an outcast, and just looking at the marvel i guess.
Wanted to sign on to be able to learn something new, yeah thatās right.
Now iām unfamiliar to programming or computational stuff but, iāll manage or notā¦
I guess i just tangle on thanā¦
Hi, Iām Sai Chand. Student at NAU. i am here for contribute to the Jupyter notebook an become a part of Jupyter notebook community.
Hi
Iām Alexander Salikov, Head of external solutions at Nebius AI. My main goal is to make ML/DS tools as accessible as possible. For this reason, we published JupiterHub in our marketplace. We want every ML engineer to be able to launch it with a few clicks.
Hi Everyone, I am a contend creator looking at how to improve our user experience by moving to Moodle and hopefully integrate some Juypter notebooks into our lessons. It has been some time since I have used Moodle, and never as an admin, so I expect to be asking lots of questions.
Hi, Manoo hereā¦excited to get going on GenAI
Hello. My name is Alvaro, from Mexico and Iām new with Python, Anaconda, Jupyter Notebook, etc. There are new projects in my company that requires new methods to solve needs.
Hi, my name is Andrus. I am a programmer and a big fan of Jupyter. Unlike most people, I write notebook code in Java
Originally, on iJava kernel, and as of late - on JJava (GitHub - dflib/jjava: A Jupyter kernel for Java notebooks), which is a fork and a natural descendant of iJava that myself and my colleagues decided to support.
Hello everyone!
Iām learning Python to be an AI developer, so I hope to answer more questions in the future, but now Iām mainly here to ask them!