Python Forum

Full Version: Basic storage of function values for monte carlo simulation
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm testing out some simple monte carlo simulations which I'd like to plot on a graph.

Here is an idea about how to do this:

1) Create an empty dataframe to store values

2) Run loop and for each run add my list of values to a new column i dataframe

3) Plot entire dataframe

My questions:

Would this make sense or is there a much more pythonic way of doing it?
Only thing I would say is to rotate it - for each run add a row, instead of a column.