How to set all the values of an existing Pandas DataFrame to zero? : <p>I currently have an existing Pandas DataFrame with a date index, and columns each with a specific name.</p>

<p>As for the data cells, they are filled with various float values.</p>

<p>I would like to copy my DataFrame, but replace all these values with zero.</p>

<p>The objective is to reuse the structure of the DataFrame (dimensions, index, column names), but clear all the current values by replacing them with zeroes.</p>

<p>The way I'm currently achieving this is as follow:</p>

<pre><code>df[df &gt; 0] = 0
</code></pre>

<p>However, this would not replace any negative value in the DataFrame.</p>

<p>Isn't there a more general approach to filling an entire existing DataFrame with a single common value?</p>

<p>Thank you in advance for your help.</p>
