BUG: GH3163 fixed to_csv with a boundry condition issue at the chunksize break
Merge pull request #3166 from jreback/GH3163

BUG: GH3163 fixed to_csv with a boundry condition issue at the chunksize break