# Using a linear combination of dataframe columns as a functional input

**URL:** <https://discourse.julialang.org/t/using-a-linear-combination-of-dataframe-columns-as-a-functional-input/73834>\
**Category:** Modelling & Simulations\
**Tags:** question, symbolic, functions\
**Created:** [December 30, 2021, 8:13pm UTC](https://discourse.julialang.org/t/using-a-linear-combination-of-dataframe-columns-as-a-functional-input/73834 "2021-12-30T20:13:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jdhooghe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jdhooghe/32/9976_2.png) [@jdhooghe](https://discourse.julialang.org/u/jdhooghe)\
**Post date:** [December 30, 2021, 8:13pm UTC](https://discourse.julialang.org/t/using-a-linear-combination-of-dataframe-columns-as-a-functional-input/73834/1 "2021-12-30T20:13:16Z")

</div>

Hello,

I have a dataframe whose column names represent polynomial portions such as ‘xy’ and as such, are symbols. I want to take all of these column names, which include:

:x  
:y  
:xy  
:xx  
:yy

and add them together using a linear combination to put into an exponential function and evaluate it for any given x and y:

f(x, y) = exp(c1_x + c2_y + c3_x_y + c4_x_x + c5_y_y)

I was wondering if this is possible with something like SymPy or another package. Thank you so much for your help.
