Create a Python Class as Data Profiler

Make a data profiler class that takes as params on the init a list of data. Include the following methods:

  • get_summary_stats: should calculate the mean, min and max. No parameters are needed in this method except self.
  • min_max_scale: converts the array to 0-1 values.
  • zscore_scale: converts the array to zscores.

这道题目你的问题在哪?我觉得这道题主要是考察同学对python class的理解,比如 self parameter。具体实现内部函数的过程非常简单,直接利用MinMaxScaler的定义,以及z-score (standardization)的定义就可以。第一个函数计算mean,min,max更是可以直接实现就可以。