title: SMOTE - AttributeError: 'numpy.ndarray' object has no attribute 'value_counts'
body: <p>I am trying to build a loan default prediction model, there is imbalanced dataset (binary)</p>
  <p>I am using smote to handle imbalance</p>
  <pre><code>X = df.iloc[:,0:30]
  y = df.iloc[:,-1]
  from imblearn.over_sampling import SMOTE 
  
  sm = SMOTE(random_state=42)
  
  X_sm, y_sm = sm.fit_resample(X, y)
  
  print(f'''Shape of X before SMOTE: {X.shape}
  Shape of X after SMOTE: {X_sm.shape}''')
  
  print('\nBalance of positive and negative classes (%):')
  y_sm.value_counts(normalize=True) * 100
  </code></pre>
  <p>Error:</p>
  <pre><code>AttributeError: 'numpy.ndarray' object has no attribute 'value_counts'
  </code></pre>