title: After scaling or normalizing values the graph is changed Python Sklearn pandas
body: <p>I am trying to scale or normalize the inputs of my training dataset using the <code>sklearn.preprocessing.MinMaxScaler()</code>. After normalizing the input, I came to know very weird output graph. It was not like the input before normalization. Please have a look at the issue:  reference for normalization of pandas columns: <a href="https://stackoverflow.com/a/26415620/4948889">https://stackoverflow.com/a/26415620/4948889</a></p>
  
  <pre><code>def normalize_data(df):
      cols = list(df_stock.columns.values)
      x = df.values #returns a numpy array
      min_max_scaler = sklearn.preprocessing.MinMaxScaler()
      x_scaled = min_max_scaler.fit_transform(x)
      df = pd.DataFrame(x_scaled)
      df.columns = cols
      return df
  df_stock = df.copy()
  cols = list(df_stock.columns.values)
  print('df_stock.columns.values = ', cols)
  df_stock_norm = df_stock.copy()
  df_stock_norm = normalize_data(df_stock_norm)
  </code></pre>
  
  <p>See the before and after graphs of the input dataframes.
  <strong>Before:</strong>  </p>
  
  <pre><code>plt.figure(figsize=(15, 5));
  plt.subplot(1,2,1);
  plt.plot(df.open.values[:20], color='red', label='open')
  plt.plot(df.close.values[:20], color='green', label='close')
  plt.plot(df.low.values[:20], color='blue', label='low')
  plt.plot(df.high.values[:20], color='black', label='high')
  plt.title('stock price')
  plt.xlabel('time [days]')
  plt.ylabel('price')
  plt.legend(loc='best')
  plt.show()
  </code></pre>
  
  <p><strong>output:</strong><br>
  <a href="https://i.stack.imgur.com/8pod7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8pod7.png" alt="before input"></a> </p>
  
  <p><strong>After:</strong></p>
  
  <pre><code>  plt.figure(figsize=(15, 5));
      plt.plot(df_stock_norm.open.values[:20], color='red', label='open')
      plt.plot(df_stock_norm.close.values[:20], color='green', label='low')
      plt.plot(df_stock_norm.low.values[:20], color='blue', label='low')
      plt.plot(df_stock_norm.high.values[:20], color='black', label='high')
      plt.title('stock')
      plt.xlabel('time [days]')
      plt.ylabel('normalized price')
      plt.legend(loc='best')
      plt.show()
  </code></pre>
  
  <p><strong>output:</strong><br>
  <a href="https://i.stack.imgur.com/WJ4wm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WJ4wm.png" alt="enter image description here"></a></p>
  
  <p>Explanation:<br>
  Please see the high and low values on both the graphs. They are weird and different, which they should be, even after normalization.   </p>
  
  <p>Please let me know what I had mistaken.<br>
  <strong>EDITED:</strong>   </p>
  
  <p>Have this as <a href="https://gist.github.com/JafferWilson/d7010f299953acdf0fe5d7da94e58b6b" rel="nofollow noreferrer">sample dataset</a> for testing the above</p>