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
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
AttributeError: 'Series' object has no attribute 'get_values'
In algorithms lab, after converting the required values to categorical values. When trying to execute the below shell, facing the following issue. I am using conda_python3 kernel and m1.t2.medium n... More on github.com
🌐 github.com
2
November 9, 2020
python - How to fix AttributeError: 'Series' object has no attribute 'to_numpy' - Stack Overflow
On an advanced note, if your Series has missing values (as NaN values), these can be converted to a masked array: More on stackoverflow.com
🌐 stackoverflow.com
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
🌐
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 ...
🌐
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 = ...
🌐
YouTube
youtube.com › blogize
How to Fix AttributeError: 'Series' object has no attribute 'value' in Pandas? - YouTube
Discover how to resolve the `AttributeError: 'Series' object has no attribute 'value'` error in Pandas through practical solutions and detailed explanations....
Published   January 13, 2025
Views   11
🌐
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   ACloudGuru-Resources
Find elsewhere
🌐
HatchJS
hatchjs.com › home › series object has no attribute: how to fix
Series Object Has No Attribute: How to Fix
January 5, 2024 - When a series object has no attribute, it means that the attribute does not exist for that object. This can happen for a variety of reasons, such as: The attribute is not supported for series objects.
🌐
Velog
velog.io › @cbkyeong › errorAttributeError-Series-object-has-no-attribute-value
[AttributeError]AttributeError: 'Series' object has no attribute 'value'
June 10, 2022 - kaggle OTT data들을 타입별로 나눠 시각화 하는 중에 movie와 show를 나눠 파이그래프로 나타내고 싶어 df['type'].value_counts로 타입별 갯수를 파악했다. 그리고 인덱스와 벨류값을 나눠서 저장하고 plt.pie로 넣어줬는데, 이런 오류를 만났다. AttributeError: 'Series' object has no attribute 'value'`(Unsupported object type list).
🌐
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.

🌐
Reddit
reddit.com › r/learnpython › how to fix: pandas profiling (v 2.8) error: 'series' object has no attribute 'reshape'
r/learnpython on Reddit: How to fix: Pandas Profiling (v 2.8) Error: 'Series' object has no attribute 'reshape'
September 3, 2020 - -> 2744 values = values.reshape(tuple((1,) + shape)) # type: ignore 2745 return values 2746 ~\AppData\Local\Continuum\anaconda3\lib\site-packages\pandas\core\generic.py in __getattr__(self, name) 5128 if self._info_axis._can_hold_identifiers_and_holds_name(name): 5129 return self[name] -> 5130 return object.__getattribute__(self, name) 5131 5132 def __setattr__(self, name: str, value) -> None: AttributeError: 'Series' object has no attribute 'reshape'
🌐
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 - To fix it, convert the Series to a DataFrame using the .to_frame() method. Alternatively, ensure you are accessing appropriate attributes for a Series, such as index or name instead of columns. The error "Series' object has no attribute 'columns'" usually occurs when working with the Pandas library in Python, indicating that a programmer is trying to access the 'columns' attribute of a Pandas Series object, which does not have this attribute...
🌐
Researchdatapod
researchdatapod.com › home › how to solve python attributeerror: ‘series’ object has no attribute ‘lower’
How to Solve Python AttributeError: 'Series' object has no attribute 'lower' - The Research Scientist Pod
November 11, 2024 - The error “‘Series’ object has no attribute ‘lower’” indicates that Pandas Series objects do not support lower() directly. Here’s an example where we attempt to use lower() on a Pandas Series to convert its string values to lowercase:
🌐
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?

🌐
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=Tex... 5274 return object.__getattribute__(self, name) 5275 5276 def __setattr__(self, name: str, value) -> None: AttributeError: 'Series' object has no attribute 'sequence'...
Author   fastai
🌐
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   pycaret
🌐
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 # files in one folder without subfolders mat_files = glob(f'{Folder}/*.mat') numberOfDbExamples = len(mat_files) Data = {} for i in range(0, numberOfDbExamples): Data[i] = read_mat(mat_files[i]) Data.keys(...
🌐
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 attribute 'is_expression_type'