This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
Howdy all,
So I’m learning to use Pandas and am trying to do some slicing in terms of columns.
I have a dataframe with about 100 columns, and I’d like to create a new one but with a specific column called “MeanCorrected_JH” in addition to every column from “Distance(km)” onwards.
I’ve tried using .loc but can’t seem to get the syntax correct for picking out a specific column plus a slice of others that are non adjacent.
If it helps, “Mean_Corrected_JH” is column index 4 and I want that plus 8 on (which I know [8:], I just can’t figure out how to combine to two syntactically)
Any guidance is muuuuch appreciated since this is for my thesis data
Subreddit
Post Details
- Posted
- 4 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/learnpython...