title: Pandas Apply Exception
body: <p>I am trying to build a function to give me the most common value in a column and when there is none just skip it or apply np.nan. However .idmax() causes issues on some columns where it is int64 or a string. Any easy way to generate most common value for a column? thanks</p>
  <pre><code>def df_missing_info(df):
      most_common_value = df.apply(lambda x: x.value_counts().idxmax())
  </code></pre>