Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cutData add ability for multiple values #3

Open
lmickes opened this issue Apr 13, 2022 · 1 comment
Open

cutData add ability for multiple values #3

lmickes opened this issue Apr 13, 2022 · 1 comment

Comments

@lmickes
Copy link
Owner

lmickes commented Apr 13, 2022

cutData allows for only one value. How about extending it to include more than one?

@stewartboogert
Copy link
Collaborator

So now it is possible to select and keep multiple different values. So the value needs to be a list. The old code (which will still work) looked like this

d = pyWitness.DataRaw("./filename.csv")
d.cutData("author", "author1", "keep")

if multiple values need to be kept it is now

d = pyWitness.DataRaw("./filename.csv")
d.cutData("author", ["author1", "author2"], "keep")

This will not work with the cut option as cut can be called multiple times and typically on different columns

d = pyWitness.DataRaw("./filename.csv")
d.cutData("author", "author1", "cut")
d.cutData("author", "author2","cut")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants