[GIS] Create shapefile from file.csv using python pyshp module

csvindexingpythonshapefile

I followed the guide given here Automate the writing records from csv to shapefile using pyshp module. I follow this procedure and the code doesn't give me any error, but it doesn't produce any output. What can I do to get an output file.shp to load in QGIS?
My example file.csv is:

y,x,day1,day2,day3
37.0925854357,14.3860984446,0.0000079572,0.0000939491,0.0000028935
37.0978554286,14.5199850398,0.0000041594,0.0000821038,0.0000015805

This is the code I wrote:

import csv, shapefile
points = shapefile.Writer(shapefile.POINT)
with open("/path/to/file.csv", 'rb') as csvfile:
     csvreader = csv.DictReader(csvfile)
     header = csvreader.fieldnames
     [points.field(field) for field in header]
     for row in csvreader:
        points.point((float(row['y'])),float(row['x']))
        points.record(*tuple([row[f] for f in header]))
points.save('points')

Best Answer

From the comments, it seems the issue was that the file was being output to an unknown location. To remedy this, modify the code as below to specify the output location.

For example, if you want to save the file to C:\Users\DF\points.shp (Windows), your last line should be:

points.save(r'C:\Users\DF\points')

Or on Linux:

points.save(r'/home/DF/points')