Converted to table example to python