You need to remove .values:

phone_numbers = merged_df.loc[(merged_df['Facility Code'] ==facility_number) & (merged_df['group'] == group) & (merged_df['Optedout'] == optout)]['phone']
Answer from Mayank Porwal on Stack Overflow
🌐
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 = ...
Discussions

python - Pandas - 'Series' object has no attribute - Stack Overflow
The frame's columns will then be the index of the series and you can access values using series[label]. ... Sign up to request clarification or add additional context in comments. ... In general, this error occurs if you try to access an attribute that doesn't exist on an object. More on stackoverflow.com
🌐 stackoverflow.com
python 3.x - df.Commission.value - AttributeError: 'Series' object has no attribute 'value' - Stack Overflow
I am receiving this error and I cannot figure out what the problem is. I have looked online but still haven't found a solution. Thank you for your help in advance! More on stackoverflow.com
🌐 stackoverflow.com
AttributeError: 'Series' object has no attribute 'labelNames'
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 # ... More on discuss.pytorch.org
🌐 discuss.pytorch.org
5
0
October 6, 2022
AttributeError: 'Series' object has no attribute 'iteritems'
Hi Dusty, First of all, great job! I'm new to all of this. While following your video on Training Object Detection Models, I had this error while Downloading the Data. File "open_images_do... More on github.com
🌐 github.com
37
May 13, 2023
🌐
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 - AttributeError: ‘Series’ object has no attribute ‘b’ · The reason this errors out is that agg takes a Series object as parameter instead of a sub dataframe. And a Series object doesn’t have a column b. If you have a need to access ...
🌐
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 › 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' I read somewhere that the newer version of pandas doesn't have iteritems() any longer but now uses items() instead.
Published   May 13, 2023
Author   githubwalt
Find elsewhere
🌐
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.

🌐
Velog
velog.io › @cbkyeong › errorAttributeError-Series-object-has-no-attribute-value
[AttributeError]AttributeError: 'Series' object has no attribute 'value'
June 10, 2022 - .value_counts의 결과로 이미 x_type_val이 vlue값을 가진 'Series' object이기에 그걸 또 value로 표현할 수 없는건 당연하다.
🌐
GitHub
github.com › ACloudGuru-Resources › Course_AWS_Certified_Machine_Learning › issues › 4
AttributeError: 'Series' object has no attribute 'get_values' · Issue #4 · ACloudGuru-Resources/Course_AWS_Certified_Machine_Learning
November 9, 2020 - AttributeError: 'Series' object has no attribute 'get_values'#4 · Copy link · Aruun · opened · on Nov 9, 2020 · Issue body actions · In algorithms lab, after converting the required values to categorical values. When trying to execute the below shell, facing the following issue.
Author   Aruun
🌐
Google Groups
groups.google.com › g › pyomo-forum › c › Org1bHNAds4
AttributeError: 'Series' object has no attribute 'is_expression_type'
You have to extract the desired constant value from the Series. ... From: pyomo...@googlegroups.com <pyomo...@googlegroups.com> on behalf of Armaghan Bhr <armaghan...@gmail.com> Sent: Thursday, April 23, 2020 10:50 AM To: Pyomo Forum Subject: [EXTERNAL] AttributeError: 'Series' object has no ...
🌐
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 - 'Series' object has no attribute '_data' -- Loaded Model fails to predict when loaded on Windows but works on Linux#746
Author   ealvarezj
🌐
GitHub
github.com › DeepSpace2 › StyleFrame › issues › 130
AttributeError: 'Series' object has no attribute 'style' · Issue #130 · DeepSpace2/StyleFrame
June 28, 2022 - Traceback (most recent call last): File "C:\Users\buhtzch\Desktop\x.py", line 25, in <module> sf.to_excel(file_path).save() File "C:\Users\buhtzch\AppData\Roaming\Python\Python39\site-packages\styleframe\style_frame.py", line 503, in to_excel data_df_style = self.data_df.at[index, column].style File "C:\Users\buhtzch\AppData\Roaming\Python\Python39\site-packages\pandas\core\generic.py", line 5478, in __getattr__ return object.__getattribute__(self, name) AttributeError: 'Series' object has no attribute 'style'
Author   buhtz
🌐
Brainly
brainly.com › computers and technology › high school › how do you fix the error: "series' object has no attribute 'columns'"?
[FREE] How do you fix the error: "Series' object has no attribute 'columns'"? - brainly.com
November 19, 2023 - In Pandas, a Series is a one-dimensional labeled array capable of holding data of any type, such as integers, floats, or strings, but it represents a single column of data. Here’s a step-by-step guide to fixing this error: Identify the Object: Make sure you understand whether you are working with a Series or a DataFrame.
🌐
Reddit
reddit.com › r/learnpython › calling a function on every item in a pandas data series object.
r/learnpython on Reddit: Calling a function on every item in a Pandas Data series object.
July 12, 2018 -

I have a pandas dataframe with two columns: the first is 'Document' which contains normal one line sentences, and the second is 'Label' which is the topic of that sentence

I want to change each sentence under the Document column such that all stopwords are removed.

Code:

def remove_sw(x):
    x = x.split(' ')
    return  ' '.join(z for z in x if z not in stop_words)

corpus_df['Document'] = 
corpus_df.apply(remove_sw,axis=1)

I am getting this error: AttributeError: ("'Series' object has no attribute 'split'", 'occurred at index 0')

So, the function is running on the entire series instead of each item in that series one at a time. Is there a parameter in the apply function to fix this or is there another function in Pandas for this?

🌐
Saturn Cloud
saturncloud.io › blog › how-to-fix-attributeerror-series-object-has-no-attribute-tonumpy-in-pandas
How to Fix AttributeError: 'Series' Object Has No Attribute 'to_numpy' in Pandas | Saturn Cloud Blog
October 4, 2023 - However, keep in mind that values has some limitations compared to to_numpy(). For example, it doesn’t handle non-numeric data as well as to_numpy() does. The AttributeError: 'Series' object has no attribute 'to_numpy' error is a common issue that data scientists encounter when working with Pandas.
🌐
GitHub
github.com › fastai › fastai › issues › 2838
'Series' object has no attribute <Column name> · Issue #2838 · fastai/fastai
September 26, 2020 - mRNA_lm = DataBlock(blocks=TextBlock.from_df('sequence', tok=SubwordTokenizer(vocab_sz=25),is_lm=True), get_x=ColReader('sequence'), splitter=RandomSplitter(0.1)) dls = mRNA_lm.dataloaders(df, bs=64) --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-20-33d42daee4b3> in <module>() ----> 1 dls = mRNA_lm.dataloaders(df, bs=64) 9 frames /usr/local/lib/python3.6/dist-packages/pandas/core/generic.py in __getattr__(self, name) 5272 if self._info_axis._can_hold_identifiers_and_holds_name(name): 5273 return self[name] -> 5274 return object.__getattribute__(self, name) 5275 5276 def __setattr__(self, name: str, value) -> None: AttributeError: 'Series' object has no attribute 'sequence' If I change the column name to 'text', then the dataloaders works.
Author   sky1ove