When you use df.apply(), each row of your DataFrame will be passed to your lambda function as a pandas Series. The frame's columns will then be the index of the series and you can access values using series[label].

So this should work:

df['D'] = (df.apply(lambda x: myfunc(x[colNames[0]], x[colNames[1]]), axis=1)) 
Answer from foglerit on Stack Overflow
🌐
Stack Overflow
stackoverflow.com › questions › 68453208 › progress-bar-on-pd-series-apply-function-doesnt-work-on-windows-attributeerror
python - progress bar on pd.Series.apply function doesn't work on Windows. AttributeError: 'Series' object has no attribute '_is_builtin_func' - Stack Overflow
--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) ~\AppData\Local\Temp/ipykernel_23140/2942098042.py in <module> 3 tqdm.pandas() 4 ----> 5 preprocessed_text_test = df.text_col.progress_apply( 6 lambda x: [ 7 x ~\Anaconda3\envs\dev\lib\site-packages\tqdm\std.py in inner(df, func, *args, **kwargs) 779 780 try: --> 781 func = df._is_builtin_func(func) 782 except TypeError: 783 pass ~\Anaconda3\envs\dev\lib\site-packages\pandas\core\generic.py in __getattr__(self, name) 5476 ): 5477 return self[name] -> 5478 return object.__getattribute__(self, name) 5479 5480 def __setattr__(self, name: str, value) -> None: AttributeError: 'Series' object has no attribute '_is_builtin_func'
🌐
Cumulative Sum
cumsum.wordpress.com › 2022 › 06 › 11 › pandas-attributeerror-series-object-has-no-attribute
[pandas] AttributeError: 'Series' object has no attribute
June 11, 2022 - There could be many reasons that you might see this error. One common case is when you are trying to access a column in groupby.agg. For instance, given a dataframe: df = pd.DataFrame({ 'a': [1, 1, 2, 2, 3], 'b': [1, 2, 3, 4, 5] }) df # a b #0 1 1 #1 1…
Discussions

AttributeError: 'Series' object has no attribute [X] when preparing DataBlock - Part 1 (2020) - fast.ai Course Forums
I am having trouble running some basic code. I have a DataFrame called papers with one column called abstracts, and I am trying to create a DataBlock to load it in a model. I prepare the data (in a Kaggle notebook with the Arxiv dataset) as a Dataframe as import json data_file = '../input/... More on forums.fast.ai
🌐 forums.fast.ai
0
December 13, 2020
python - Pandas - 'Series' object has no attribute - Stack Overflow
Communities for your favorite technologies. Explore all Collectives · Ask questions, find answers and collaborate at work with Stack Overflow for Teams More on stackoverflow.com
🌐 stackoverflow.com
simple "attributeerror" exception is driving me mad
As the error clearly says, this is a Series object (presumably from Pandas), not an instance of BTC_predict. This is because that's what history_price() returns - the result of calling df.groupby('timestamp').mean()['price']. Why do you expect this to be a BTC_predict object? Did you maybe mean to call btcc.train_test_split(price_matrix)? More on reddit.com
🌐 r/learnpython
3
1
November 27, 2022
python - How to fix AttributeError: 'Series' object has no attribute 'to_numpy' - Stack Overflow
Communities for your favorite technologies. Explore all Collectives · Ask questions, find answers and collaborate at work with Stack Overflow for Teams More on stackoverflow.com
🌐 stackoverflow.com
🌐
PyTorch Forums
discuss.pytorch.org › t › attributeerror-series-object-has-no-attribute-labelnames › 162952
AttributeError: 'Series' object has no attribute 'labelNames' - PyTorch Forums
October 6, 2022 - Hello. I have some matlab files containing some matrix (x1, x2,…) and a table (called labelNames). With the following code I’m trying to access to labelNames contained in the matlab files: Folder = 'dataCubes/' # Listing all .mat files contained in dataCubes folder; hence, put all mat # ...
🌐
GitHub
github.com › tqdm › tqdm › issues › 1199
support pandas==1.3.0 · Issue #1199 · tqdm/tqdm
pandas-dev/pandas#42356 AttributeError: 'DataFrame' object has no attribute '_is_builtin_func' need to check what the internal pandas replacement API call is migrate to pandas.core.common.is_builtin_func.
🌐
Google Groups
groups.google.com › g › pyomo-forum › c › Org1bHNAds4
AttributeError: 'Series' object has no attribute 'is_expression_type'
self.block.temperature_out_cv = Var(lines, self.block.all_time, self.block.all_x) · You can't use a Pandas Series object directly in a Pyomo expression. You have to extract the desired constant value from the Series
🌐
Fast.ai
forums.fast.ai › part 1 (2020)
AttributeError: 'Series' object has no attribute [X] when preparing DataBlock - Part 1 (2020) - fast.ai Course Forums
December 13, 2020 - I am having trouble running some basic code. I have a DataFrame called papers with one column called abstracts, and I am trying to create a DataBlock to load it in a model. I prepare the data (in a Kaggle notebook with the Arxiv dataset) as a Dataframe as import json data_file = '../input/arxiv/arxiv-metadata-oai-snapshot.json' def get_metadata(): with open(data_file, 'r') as f: for line in f: yield line metadata = get_metadata() titles = [] abstracts = ...
Find elsewhere
🌐
GeeksforGeeks
geeksforgeeks.org › python › how-to-fix-attributeerror-object-has-no-attribute
How to fix AttributeError: object has no attribute - GeeksforGeeks
July 23, 2025 - We have included the "hasattr()" function inside the if-else to add logic to our code snippet. This will avoid the AttributeError: object has no attribute error.
🌐
Reddit
reddit.com › r/learnpython › simple "attributeerror" exception is driving me mad
r/learnpython on Reddit: simple "attributeerror" exception is driving me mad
November 27, 2022 -

full code here: https://github.com/josevqzmdz/proyecto_final_6/blob/main/main.py

for some reason, python does not detect, so to speak, that my class, BTC_predict, has indeed a train_test_split method. it is right there, it has no mistakes by its own. yet it refuses to call it. the full error is this one:

AttributeError: 'Series' object has no attribute 'train_test_split'

but why? I'm sure i'm missing something super obvious, but I can't see it. the piece of code that runs until it hits this wall is this:

btcc = BTC_predict()
history_price = btcc.history_price()
price_matrix = btcc.price_matrix_creator(history_price)
price_matrix = btcc.normarlize_windows(price_matrix)
row, X_train, y_train, X_test, y_test =        history_price.train_test_split(price_matrix)

it beats me, I see nothing wrong with this implementation. the original code from the article I'm learning from looks like this:

ser = hist_price_dl() # Not passing any argument since they are set by default
price_matrix = price_matrix_creator(ser) # Creating a matrix using the  dataframe
price_matrix = normalize_windows(price_matrix) # Normalizing its values to fit to RNN
row, X_train, y_train, X_test, y_test = train_test_split_(price_matrix) # Applying train-test splitting, also returning the splitting-point

the only difference being the article is running everything in one file, while I took the liberty of making a class with all of it inside so it's not as cluttered.

🌐
Quora
quora.com › What-does-AttributeError-function-object-has-no-attribute-iterrows-mean
What does AttributeError: 'function' object has no attribute 'iterrows' mean? - Quora
Answer (1 of 2): What it says… You are trying to access an attribute called iterrows but the object in question does not have such attribute, because it is a function, Without seeing the code we can only guess but it seems that you may have forgotten to write a pair of parentheses after the fun...
🌐
Real Python
realpython.com › ref › builtin-exceptions › attributeerror
AttributeError | Python’s Built-in Exceptions – Real Python
Catching an AttributeError allows you to provide a graceful degradation or alternative solution when users try to access an attribute that’s missing. Accessing a method or attribute that doesn’t exist in a class or module ... Attempting to access attributes on a NoneType object due to uninitialized or improperly assigned variables
🌐
PyTorch Forums
discuss.pytorch.org › t › attributeerror-series-object-has-no-attribute-as-matrix-from-kaggle › 148082
AttributeError: 'Series' object has no attribute 'as_matrix' (From kaggle) - PyTorch Forums
April 1, 2022 - I am new to using Torch but I am trying to use a pretrained model to build my model. As a first step to understanding the process I am trying to duplicate the results from the kaggle site: Use pretrained PyTorch models | Kaggle All is well until I reach the first line of cell 13: img, label = next(iter(train_dl)) I then get an AttributeError: AttributeError Traceback (most recent call last) /tmp/ipykernel_30361/1705970776.py in ----> 1 img, label = next(iter(train...
🌐
GitHub
github.com › pycaret › pycaret › issues › 746
'Series' object has no attribute '_data' -- Loaded Model fails to predict when loaded on Windows but works on Linux · Issue #746 · pycaret/pycaret
October 21, 2020 - Unused 5823 """ -> 5824 return self.copy(deep=True) 5825 5826 def _convert( ~\Anaconda3\lib\site-packages\pandas\core\generic.py in copy(self, deep) 5809 dtype: object 5810 """ -> 5811 data = self._data.copy(deep=deep) 5812 return self._constructor(data).__finalize__(self) 5813 ~\Anaconda3\lib\site-packages\pandas\core\generic.py in __getattr__(self, name) 5268 or name in self._accessors 5269 ): -> 5270 return object.__getattribute__(self, name) 5271 else: 5272 if self._info_axis._can_hold_identifiers_and_holds_name(name): AttributeError: 'Series' object has no attribute '_data'
Author   ealvarezj
🌐
GitHub
github.com › dusty-nv › jetson-inference › issues › 1640
AttributeError: 'Series' object has no attribute 'iteritems' · Issue #1640 · dusty-nv/jetson-inference
May 13, 2023 - File "open_images_downloader.py", line 212, in log_counts(annotations[dataset_type]['ClassName']) File "open_images_downloader.py", line 80, in log_counts for k, count in values.value_counts().iteritems(): File "/usr/local/lib/python3.8/dist-packages/pandas/core/generic.py", line 5989, in getattr return object.getattribute(self, name) AttributeError: 'Series' object has no attribute 'iteritems'
Published   May 13, 2023
Author   githubwalt
🌐
GitHub
github.com › tqdm › tqdm › issues › 634
AttributeError: 'Series' object has no attribute 'progress_map' · Issue #634 · tqdm/tqdm
October 29, 2018 - but when I run this program, given this error: AttributeError: 'Series' object has no attribute 'progress_map'
Author   yjyGo
🌐
GitHub
github.com › kbknudsen › PyEIS › issues › 10
AttributeError: 'Series' object has no attribute 'real' using EIS_plot method · Issue #10 · kbknudsen/PyEIS
September 15, 2020 - I was able to fit an experimental data using ex.EIS_fit(params=params, circuit='R-RQ-RQ',weight_func='modulus') However when I tried to plot the data using ex2.EIS_plot(legend='potential', bode='log', fitting='on'), it generates the erro...
Author   swsyoon