How to parse through pandas dataframe, make new column based on the value of two other columns

I would like to create a new column ‘column_new’ based on values from column_1 and column_2 or column_3. If column_1 == ‘C’, then column_new is same value as column_2, but if column_1 == ‘G’, then column_new is same value as column_3. I have tried: def new_value(x): if df1[‘column_1’] == ‘C’ : return df1[‘column_2’] if df1[‘column_1’]…

Details

TCPDF full page table

I tried many ways to make the table to fit to the page(A4) as shown on the picture: I searched a lot but couldn’t find anything useful on the web. I’m using dynamic table, everything is ok except the width of the table. here is my code : $content = ‘<table><thead><tr><th class=”bg-dark text-white” align=”center”>#</th><th align=”center”…

Details