Defining functions for multiple data sets
<p>I have bunch of data sets and their names are like;</p>

<pre><code>df_a
df_b
df_c
df_d
...
</code></pre>

<p>All the data sets have the same columns,
My question is, I want to apply some functions all the data sets.</p>

<p>The functions are like:</p>

<pre><code>df.fillna(0, inplace=True)
df['day_of_week'] = df.date.map(lambda x: x.strftime("%A"))
</code></pre>

<p>But I don't want to write these and another functions for all data sets separately. Is there any solution for for writing these functions in short cut for all data frames?</p>

<pre><code>dfs = [df_a, df_b, ...]

for dataset in dfs:
    do_thing(dataset)
</code></pre>

python function pandas