Questions tagged [future-warning]
25 questions
1
vote
2 answers
FutureWarning when applying a condition on a pandas dataframe to filter an array
I have applied PCA to an array of around 1000 observations but only want to keep the observation in the new array IF one of the features from the original array = something.
I have a numpy array df2 and a dataframe df. I want to find all rows in df2…

pow
- 415
- 3
- 8
- 18
0
votes
0 answers
Getting a Future warning about keepdims when using Kneighbors classifier
I am using Kneighbors classifier to train some data using Jupyter notebook. It worked fine, but showed this future warning:
C:\Users\PERSONAL\anaconda3\lib\site-packages\sklearn\neighbors\_classification.py:228: FutureWarning: Unlike other reduction…

Ayushman Pani
- 1
- 2
0
votes
0 answers
FutureWarning Pandas Error for Split Function
I am cleaning my dataset to prepare it for analysis, and I have several lines of code that look like this:
referrals[['First Name','Last Name']] = referrals['Victim'].str.split(' ', 1, expand=True)
The 'Victims' column holds the full name, and I…

jocho
- 13
- 2
0
votes
0 answers
Python Futurewarning: How would i reconoiter this to get rid of futurewarning?
Python Futurewarning: How would i reconoiter this to get rid of futurewarning??
for symbol in symbol_string.split(','):
hqm_dataframe = hqm_dataframe.append(
pd.Series([symbol,
…

actorcat
- 1
- 2
0
votes
0 answers
Numpy's Future Warning for Comparison of Ndarrays when Trying to Create a Numpy Structured Array
When trying to create a numpy structured array with the code below:
import numpy as np
z = np.zeros([3,3], dtype=[("x",float)])
print(z)
I'm getting two Future Warnings:
sys:1: FutureWarning: elementwise comparison failed; returning scalar instead,…

Gustavo Mirapalheta
- 931
- 2
- 11
- 25
0
votes
1 answer
FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use `arr[tuple(seq)]` instead of `arr[seq]`
In [57]: dW = np.zeros((2,2), int)
In [58]: x = [[0,1,1,0,1, 0], [1, 1, 1, 1, 0, 0]]
In [59]: np.add.at(dW,x,1) …

David
- 393
- 3
- 4
- 11
0
votes
1 answer
How to properly adjust code due to this futurewarning? (multidimensional indexing numpy)
How to adjust the indexing in this code, so that it will work properly due to this FutureWarning?
D:/Arc/Arc_Project\Architecture\_Z07_Adjust_X_Y\backward_sequentialize.py:165: FutureWarning: Using a non-tuple sequence for multidimensional indexing…

La-Li-Lu-Le-Lo
- 91
- 1
- 7
0
votes
2 answers
Strange warning using dask.dataframe to read csv
I am using dask dataframe module to read a csv.
In [3]: from dask import dataframe as dd
In [4]: dd.read_csv("/file.csv", sep=",", dtype=str, encoding="utf-8",…

Nicolas Martinez
- 719
- 1
- 6
- 23
0
votes
1 answer
Why does select raise a FutureWarning?
In my code I have a 2D numpy.ndarray filled with numpy.str_ values. I'm trying to change values "null" to "nan" using the select method. The problem is that this method raises a FutureWarning.
I have read this. On a suggestion there I tried to not…

Tomáš Hons
- 355
- 3
- 11
-2
votes
2 answers
How to fix an issue I have with pandas.json in Python?
I am trying to run a code in Python.
I upload the libraries as follow:
import requests
import json
from datetime import datetime
import pandas as pd
import re
from pandas.io.json import json_normalize
And when I try to extract information from a…

Messi10
- 37
- 1
- 3