Error Python FPDF. Drawing a table
with pdf.table(
borders_layout="NO_HORIZONTAL_LINES",
cell_fill_color=(224, 235, 255),
cell_fill_logic=lambda i, j: i % 2,
col_widths=(42, 39, 35, 42),
headings_style=headings_style,
line_height=6,
text_align=("LEFT", "CENTER", "RIGHT", "RIGHT"),
width=160,
) as table:
for data_row in data:
row = table.row()
TypeError: __init__() got an unexpected keyword argument 'cell_fill_logic'
OK, new code, with input as
countries.txt
:my code :
output with
cell_fill_mode= 'NONE',
:output with
cell_fill_mode= 'ALL',
: