I have data in a .csv that looks something like this:
Entry A Xa0,Ya0 Xa1,Ya1 Xa2,Ya2
Entry B Xb0,Yb0 Xb1,Yb1 Xb2,Yb2
Entry C Xc0,Yc0 Xc1,Yc1 Xc2,Yc2
The ultimate goal is to plot the points in each entry and connect them with lines, resulting in shape A, shape B, shape C, etc.
For now I am hung up on how to import these columns using arcpy. In the ArcGIS documentation there is code like this (and a tool that does the same thing) but it assumes lat/long are split up into separate columns:
in_Table = "table.csv" x_coords = "POINT_X" y_coords = "POINT_Y" z_coords = "POINT_Z" out_Layer = "points_layer" saved_Layer = r"c:\output\points.lyr" # Make the XY event layer... arcpy.MakeXYEventLayer_management(in_Table, x_coords, y_coords, out_Layer, spRef, z_coords)
How do I modify this code to work with my data in the format it is in, that is, where a single column represents an X,Y pair?