Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
Python
pandas split dataframe into chunks with a condition
N A
Programming language:
Python
2021-07-15 12:46:52
1
Q:
pandas split dataframe into chunks with a condition
Hils Cheyne
Code:
Python
2021-06-30 05:42:33
import numpy as np np.split(df, *np.where(df['column'] == condition))
0
Tags
data
int
con
frame
dataframe
pandas
into
Related
how to use split in pandas
python pandas split column
split coumn of df into multiple dynamic columns
pandas split dataframe to train and test
split a variable into multiple variables in python
python divide one column by another
comparing timestamp in pandas
pandas split by space
pandas split column with tuple
split pandas dataframe in two
expand pandas dataframe into separate rows
python convert strings to chunks
How to split a text column into two separate columns?
python split dict into chunks
split datetime to date and time pandas
pandas sep and delimiter
New to Communities?
Join the community