Q:

How to append iteration (from each iter.) results to final Dataframe containing all iteration results?

I am trying to append the results of a matrix of calculations to my df. And I have a problem seing the bigger picture of how to design my iterations for calculations. I have the following code that should exemplify what I am trying to do.
import pandas as pd
from pandas import DataFrame
import numpy as np

np_all = np.array([[1, 'vws.co', 1],
                    [1, 'nflx', 3],
                    [1, 'aapl', 2],
                    [2, 'vws.co', 1],
                    [2, 'nflx', 2],
                    [2, 'aapl', 1],
                    [3, 'vws.co', 1],
                    [3, 'nflx', 3],
                    [3, 'aapl', 1]])

df_all = pd.DataFrame(data=np_all, columns=['Date', 'Ticker', 'Close'])
df_all = df_all.sort(['Ticker','Date'], ascending=[1,1])

df_kpi_list = []
stocklist   = ['vws.co','nflx','aapl']

print (df_all)

def screener(df_all,ticker):

    # Copy df_all to df for single ticker operations
    df = df_all
    # filter to only relevant ticker
    df = df[df['Ticker'] == ticker]
    df = df[df.Ticker == ticker.lower()]

    def kpi1_calc(df,ticker):

        # do some KPI calculation that are appended to new columns of df
        pass

        def kpi2_calc(df,ticker):

            # do more KPI calculation that are appended to new columns of df
            pass

            def kpi3_calc(df,ticker):
                # example of more KPI calculation that are appended to new columns of df

                # Add content to df - RSI
                rsi = 3  # stupid example of a constant that is stored in df column
                r = rsi
                # add a RSI column
                r['RSI'] = rsi
                df_kpi_list.append(r)

                return df
            return df
        return df

    # concatenate all the ticker-iteration dfs from df_kpi_list into one df_all
    df_all = pd.concat(df_kpi_list)

    return df_all

if __name__ == '__main__':
    for ticker in stocklist:
        df_data = screener(df_all, ticker)

    print (df_data)

I have several layers of added complexity of data:

df_kpi_list = []  is an empty list that ticker-specific dfs will be appended to, so I can concat these to a new all encompassing df_all in the end.
df_all is a df with all my stockinfo (multiple tickers info of timeseries data stock-info)
df the same info, but now filtered to only the relevant ticker being iterated
The above df (pr ticker) will for each kpi[no]_calc function be added more info with columns being added - and should be added to the list: df_kpi_list = []

What is the smartest way to handle this information being calculated, and finally summed into an all encompassing df_all?

A:

Make sure that 

df = df_all

do copy the contents and not just make a reference. It can screw up your computaionen later on.
General there are two ways of doing it:

Make the sum as you go along
Save the result in a list and then sum the list afterwards

