Questions tagged [future-warning]

25 questions
248
votes
5 answers

How to suppress Pandas Future warning ?

When I run the program, Pandas gives 'Future warning' like below every time. D:\Python\lib\site-packages\pandas\core\frame.py:3581: FutureWarning: rename with inplace=True will return None from pandas 0.11 onward " from pandas 0.11 onward",…
bigbug
  • 55,954
  • 42
  • 77
  • 96
10
votes
2 answers

How do I solve the future warning -> % (min_groups, self.n_splits)), Warning) in python?

When I run mean_acc() method in my program, there are % (min_groups, self.n_splits)), Warning) errors... def mean_acc(): models = [ RandomForestClassifier(n_estimators=200, max_depth=3, random_state=0), LinearSVC(), …
School
  • 723
  • 3
  • 8
  • 17
6
votes
1 answer

Why do I get a 'FutureWarning' with pandas.concat?

Does anyone meet this similar FutureWarning? I got this when I was using Tiingo+pandas_datareader? The warning is like: python3.8/site-packages/pandas_datareader/tiingo.py:234: FutureWarning: In a future version of pandas all arguments of concat…
yunfei
  • 526
  • 2
  • 6
  • 20
5
votes
1 answer

openpyxl - FutureWarning: The behavior of this method will change in future versions. Use specific 'len(elem)' or 'elem is not None' test instead

I'm getting a warning when loading an xlsm file using openpyxl for python, then saving/closing it after I add some data to specific 7 cells in a specific sheet. The issue is that I'm getting a "FutureWarning" that I have no idea what it is about.…
akondo
  • 65
  • 2
  • 6
4
votes
2 answers

Error while trying to run ```corr()``` in python with pandas module

While trying to run the corr() method in python using pandas module, I get the following error: FutureWarning: The default value of numeric_only in DataFrame.corr is deprecated. In a future version, it will default to False. Select only valid…
Elixir0101
  • 331
  • 1
  • 2
  • 15
4
votes
1 answer

Fix FutureWarning related to the pandas append function

I am getting the following FutureWarning in my Python code: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. Right now I was using the append function, in various…
Carola
  • 366
  • 4
  • 18
4
votes
1 answer

Pytest: How to locate a FutureWarning and fix it?

In my current project when I run my tests (with pytest) I get this output (besides others): ml_framework/tests/test_impute.py: 8 warnings ml_framework/tests/test_transform_pipeline.py: 9 warnings ml_framework/tests/test_data_transforms.py: 27…
Nerxis
  • 3,452
  • 2
  • 23
  • 39
4
votes
1 answer

scipy binned statistcs future warning

function binned statistics from scipy.stats raise warning: /usr/local/lib/python3.5/dist-packages/scipy/stats/_binned_statistic.py:607: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use arr[tuple(seq)]…
jarekj71
  • 103
  • 7
2
votes
0 answers

pandas.core.index is deprecated and will be removed in a future version

When running my Python code, I am getting the following general warning: pandas.core.index is deprecated and will be removed in a future version. The public classes are available in the top-level namespace. The error comes from the following…
Archie
  • 2,247
  • 1
  • 18
  • 35
2
votes
1 answer

Python loc + isin returns FutureWarning (elementwise comparison failed)

df = df.loc[df['var'].isin(df2['this'].unique().tolist())] The code above gives me a FutureWarning and I can't work out a way around it. Is this a bug or…
Stphn
  • 107
  • 8
2
votes
1 answer

Deprecation warning for np.ptp

I'm using Python and when using the following code df['timestamp'] = df.groupby(["id"]).timestamp.transform(np.ptp) I'm getting the warning FutureWarning: Method .ptp is deprecated and will be removed in a future version. Use numpy.ptp instead.. df…
machinery
  • 5,972
  • 12
  • 67
  • 118
2
votes
2 answers

Pandas Dataframe rolling_max futurewarning error

i have a python pandas code to parse url Json data from api to dataframe import pandas as pd import json import urllib.request import os from pandas import DataFrame with urllib.request.urlopen( …
1
vote
1 answer

FutureWarning about encoding from to_excel Pandas

My code: df.to_excel('sheet.xlsx', encoding='utf-8') The error message: FutureWarning: the 'encoding' keyword is deprecated and will be removed in a future version. Please take steps to stop the use of 'encoding' How can I replace the 'encoding'?
1
vote
1 answer

FutureWarning: Dropping of nuisance columns in DataFrame reductions with df.median

I have tried lots of things and can't figure out how to do the medians of the columns I need. I dont dont why they are "nuisance columns" The warning is: FutureWarning: Dropping of nuisance columns in DataFrame reductions (with 'numeric_only=None')…
mike
  • 21
  • 3
1
vote
1 answer

FutureWarning from signaltools.py

from scipy.signal import resample A = np.array([1,2,3]) resample(A, 6) ... works, but throws a warning: /Users/pi/anaconda/lib/python3.6/site-packages/scipy/signal/signaltools.py:2223: FutureWarning: Using a non-tuple sequence for multidimensional…
P i
  • 29,020
  • 36
  • 159
  • 267
1
2