pymysql module obtaining information about the results the cursor object can also be used to obtain information about the results to be fetched such as how many rows there are in the results and what the type is of each attribute in the resultscusor rowcount(this is read-only property that indicates the number of rows returned for select statement or rows affected for update or insert statement cursor description(this is read-only property that provides description of each attribute in the results set each description provides the name of the attribute and an indication of the type (via type_codeas well as further information on whether the value can be null or not and for numbers scaleprecision and size information an example of using these two properties is given belowprint('cursor rowcount'cursor rowcountprint('cursor description'cursor descriptiona sample of the output generated by these lines is given belowcursor rowcount cursor description (('id' none false)('name' none false)('surname' none false)('subject' none false)('email' none false)fetching results now that successful select statement has been run against the databasewe can fetch the results the results are returned as tuple of tuples as mentioned in the last there are several different fetch options available including fetchone ()fetchmany(sizeand fetchall(in the following example we use the fetchall(option as we know that there are only up to six rows that can be returned fetch all the rows and then iterate over the data data cursor fetchall(for row in dataprint('row:'rowin this case we loop through each tuple within the data collection and print that row out howeverwe could just as easily have extracted the information in the tuple