Mar-05-2019, 08:56 PM
Hello guys,first time on this forum.
I am working in geomatic processes automation and I have a little question regarding pandas.
I am currently working with a pd.dataframe indexed by street names. The same street name is present several times in my dataframe index.
I am looking for a way to get values based on the index (ex:'WashingtonStreet'). I would like the pandas to return all the rows indexed
with this particular string. Right now, all I am able to get is the first encounter of that index as a returned row :
My dataframe structure looks like this :
Index : Street names
FID
X coordinate
Y coordinate
Bearing
Street names
Thanks, and if you have comments on how to improve my thread, feel free.
M.C
I am working in geomatic processes automation and I have a little question regarding pandas.
I am currently working with a pd.dataframe indexed by street names. The same street name is present several times in my dataframe index.
I am looking for a way to get values based on the index (ex:'WashingtonStreet'). I would like the pandas to return all the rows indexed
with this particular string. Right now, all I am able to get is the first encounter of that index as a returned row :
print(sub_df.loc['RangSaint_Joseph'])
My dataframe structure looks like this :
Index : Street names
FID
X coordinate
Y coordinate
Bearing
Street names
Thanks, and if you have comments on how to improve my thread, feel free.
M.C