Error: ValueError('%r cannot be used to seed a numpy.random.RandomState') I am getting this error message while trying to fit a model for the isolationForest algorithm.

raise ValueError('%r cannot be used to seed a numpy.random.RandomState'


Below is my code:

 import numpy as np
 import matplotlib.pyplot as plt
 from sklearn.ensemble import IsolationForest
 import pandas as pd

np.random.RandomState(1234)
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import LabelEncoder
df = pd.read_csv('E://Market_dat.csv',names=['EVENT_DT', 'MARKET_NAME', 'Duration', 'TOTAL_COUNTS'],skiprows=1,index_col=0)
for column in df.columns:
if df[column].dtype == type(object):
    le = LabelEncoder()
    df[column] = le.fit_transform(df[column])
    np.random.get_state()

X_train, X_test = train_test_split(df, test_size=0.3)
print(X_test)
print(X_train)
X_outliers = rng.uniform(low=-4, high=4, size=(20, 2))
clf = IsolationForest(behaviour='new', max_samples=100,
                      random_state=df, contamination='auto')
clf.fit(X_train)


Can anyone give any insight as to why I might be getting this error?
Because you are creating a IsolationForest instance with random_state getting initialised to pandas.DataFrame. The code docs for random_state explain it as  


  random_state : int, RandomState instance or None, optional (default=None). If int, random_state is the seed used by the random number generator; If RandomState instance, random_state is the random number generator; If None, the random number generator is the RandomState instance used by np.random.