You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just upgraded to Python 3 (running Pandas 2.1.1) and some future warings pop up
`import pandas as pd
from sklearn import datasets
from dython.nominal import associations
Load data
iris = datasets.load_iris()
Convert int classes to strings to allow associations
method to automatically recognize categorical columns
target = ['C{}'.format(i) for i in iris.target]
Prepare data
X = pd.DataFrame(data=iris.data, columns=iris.feature_names)
y = pd.DataFrame(data=target, columns=['target'])
df = pd.concat([X, y], axis=1)
Plot features associations
associations(df)`
C:\Users\User\AppData\Roaming\Python\Python310\site-packages\dython\nominal.py:708: FutureWarning: Setting an item of incompatible dtype is deprecated and will raise in a future error of pandas. Value '' has dtype incompatible with float64, please explicitly cast to a compatible dtype first.
inf_nan.loc[columns[i], columns[j]] = _inf_nan_str(ij)
C:\Users\User\AppData\Roaming\Python\Python310\site-packages\dython\nominal.py:709: FutureWarning: Setting an item of incompatible dtype is deprecated and will raise in a future error of pandas. Value '' has dtype incompatible with float64, please explicitly cast to a compatible dtype first.
inf_nan.loc[columns[j], columns[i]] = _inf_nan_str(ji)
As Python 3.12 was released,
dython
needs to be tested for it too.The text was updated successfully, but these errors were encountered: