title: Apply arithmetic operation from json file to dataframe without using eval function
body: <p>I have json file contains arithmetic operation list to apply in dataframe columns,
  I used <strong>eval</strong> function , but i could not use eval function due to security issue, how can apply  arithmetic operation from json file without using <strong>eval</strong> function
  my df function will be like the below table:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th style="text-align: left;">a</th>
  <th style="text-align: center;">b</th>
  <th style="text-align: right;">c</th>
  <th style="text-align: right;">d</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td style="text-align: left;">10</td>
  <td style="text-align: center;">20</td>
  <td style="text-align: right;">40</td>
  <td style="text-align: right;">25</td>
  </tr>
  <tr>
  <td style="text-align: left;">15</td>
  <td style="text-align: center;">10</td>
  <td style="text-align: right;">35</td>
  <td style="text-align: right;">10</td>
  </tr>
  <tr>
  <td style="text-align: left;">25</td>
  <td style="text-align: center;">20</td>
  <td style="text-align: right;">30</td>
  <td style="text-align: right;">100</td>
  </tr>
  <tr>
  <td style="text-align: left;">100</td>
  <td style="text-align: center;">15</td>
  <td style="text-align: right;">35</td>
  <td style="text-align: right;">20</td>
  </tr>
  <tr>
  <td style="text-align: left;">20</td>
  <td style="text-align: center;">25</td>
  <td style="text-align: right;">25</td>
  <td style="text-align: right;">15</td>
  </tr>
  <tr>
  <td style="text-align: left;">10</td>
  <td style="text-align: center;">25</td>
  <td style="text-align: right;">45</td>
  <td style="text-align: right;">30</td>
  </tr>
  <tr>
  <td style="text-align: left;">10</td>
  <td style="text-align: center;">20</td>
  <td style="text-align: right;">40</td>
  <td style="text-align: right;">25</td>
  </tr>
  <tr>
  <td style="text-align: left;">10</td>
  <td style="text-align: center;">20</td>
  <td style="text-align: right;">40</td>
  <td style="text-align: right;">25</td>
  </tr>
  </tbody>
  </table>
  </div>
  <pre><code>json_ops_list= {&quot;1&quot;:&quot;a/b&quot;,
  &quot;2&quot;:&quot;a+b+c&quot;,
  &quot;3&quot;: &quot;(a-b)/(b+d)&quot;,
  
  &quot;4&quot;:&quot;(a-b)/(b*d+c)&quot;}
  def calculations(df, json_ops_list):
      final_df = pd.DataFrame()
      for i in json_ops_list:
          col_name = i + '_final'
          final_df[col_name] = df.eval(i)
      return final_df```
  
  
  </code></pre>