internet data handling and encoding writerows(rowswrites multiple rows of data rows must be sequence of rows as passed to the writerow(method dictreader(csvfile [fieldnames [restkey [restval [dialect [**fmtparams]]]]]returns reader object that operates like the ordinary reader but returns dictionary objects instead of lists of strings when reading the file fieldnames provides list of field names used as keys in the returned dictionary if omittedthe dictionary key names are taken from the first row of the input file restkey provides the name of dictionary key that' used to store excess data--for instanceif row has more data fields than field names restval is default value that' used as the value for fields that are missing from the input--for instanceif row does not have enough fields the default value of restkey and restval is none dialect and fmtparams have the same meaning as for reader(dictwriter(csvfilefieldnames [restval [extrasaction [dialect [**fmtparams]]]]returns writer object that operates like the ordinary writer but writes dictionaries into output rows fieldnames specifies the order and names of attributes that will be written to the file restval is the value that' written if the dictionary being written is missing one of the field names in fieldnames extrasaction is string that specifies what to do if dictionary being written has keys not listed in fieldnames the default value of extrasaction is 'raise'which raises valueerror exception value of 'ignoremay be usedin which case extra values in the dictionary are ignored dialect and fmtparams have the same meaning as with writer( dictwriter instancewsupports the following methodsw writerow(rowwrites single row of data to the file row must be dictionary that maps field names to values writerows(rowswrites multiple rows of data rows must be sequence of rows as passed to the writerow(method sniffer(creates sniffer object that is used to try and automatically detect the format of csv file sniffer instanceshas the following methodss sniff(sample [delimiters]looks at data in sample and returns an appropriate dialect object representing the data format sample is portion of csv file containing at least one row of data delimitersif suppliedis string containing possible field delimiter characters has_header(samplelooks at the csv data in sample and returns true if the first row looks like collection of column headers lib fl ff