I am quite new to Python and eager to learn. I want to open and use data from a csv file, but only use the data (four columns of values, seperated by ",") after a specific string (s,s,N,s). The string ssNs is not always in the same row, so I cannot use the rownumber.
Can you help me on how to use the data? My current code so far looks like the following;
import pandas as pd
import math
import sys
data = pd.read_csv(r'C:\Users\User\Documents\pythonProject\filename.csv', engine="python",sep=',',encoding='latin-1')
if len(row) > 1:
if row[0].startswith('s,s,N,s'):
print(row)

Here is a working example I've used for a personal project. Don't mind the chardet module, it is only there to detect the encodage
Just use this function with the path of your filename, your keyword here would be 's,s,N,s'