Python pandas generating first day of month from array of datetime
<p>I am trying to obtain the first day of month from array of datetime i.e. change all days to <code>1</code> and all hours to <code>0</code>:</p>

<pre><code>import pandas as pd
z1 = [datetime(2025, 10, 1, 3, 0),datetime(2025, 1, 6, 7, 0)]
pd.DatetimeIndex(z1).normalize()
DatetimeIndex(['2025-10-01', '2025-01-06'], dtype='datetime64[ns]', freq=None)
</code></pre>

<p>I was hoping to achieve</p>

<pre><code>DatetimeIndex(['2025-10-01', '2025-01-01'], dtype='datetime64[ns]', freq=None)
</code></pre>