title: Pandas - Case when & default in pandas
body: <p>I have the below case statement in python,</p>
  <pre class="lang-py prettyprint-override"><code>pd_df['difficulty'] = 'Unknown'
  pd_df['difficulty'][(pd_df['Time']&lt;30) &amp; (pd_df['Time']&gt;0)] = 'Easy'
  pd_df['difficulty'][(pd_df['Time']&gt;=30) &amp; (pd_df['Time']&lt;=60)] = 'Medium'
  pd_df['difficulty'][pd_df['Time']&gt;60] = 'Hard'
  </code></pre>
  <p>But when I run the code, it throws an error.</p>
  <pre class="lang-none prettyprint-override"><code>A value is trying to be set on a copy of a slice from a DataFrame
  </code></pre>