Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
Python
split pandas dataframe in two
David
Programming language:
Python
2021-07-12 09:22:10
0
Q:
split pandas dataframe in two
Ben Fletcher
Code:
Python
2021-06-17 21:15:04
df_new1, df_new2 = df[:10, :], df[10:, :] if len(df) > 10 else df, None
0
Tags
data
frame
two
dataframe
pandas
Related
combine df columns python
split a pd dataframe
pandas split dataframe into chunks with a condition
expand pandas dataframe into separate rows
pandas split by space
how to merge two pandas dataframes on a column
how to merge two column pandas
combine two dataframe in pandas
pandas split column with tuple
merge two columns pandas
python merge strings in columns
pandas merge two columns from different dataframes
how to use split in pandas
python pandas split column
How to split a text column into two separate columns?
split coumn of df into multiple dynamic columns
pandas split dataframe to train and test
New to Communities?
Join the community