[ad_1]
Given a large CSV file(large enough to exceed RAM), I want to read only specific columns following some patterns. The columns can be any of the following: S_0, S_1, ...D_1, D_2
etc. For example, a chunk from the data frame looks like this:
And the regex pattern would be for example anyu column that starts with S
: S_\d.*
.
Now, how do I apply this with pd.read_csv(/path/, __)
to read the specific columns as mentioned?
[ad_2]