Skip to content

Daniel you told that we should first do some small experiments and then do bigger experiments... #22

Answered by mrdbourke
Programmer-RD-AI asked this question in Q&A
Discussion options

You must be logged in to vote

Hey Ranuga,

That's correct, you can do experiments by lowering the amount of data you use.

For example, if you have 100,000 rows, you might try to get something working on 1,000 rows (1% of the data) and then scale up to the full 100,000 when you find it works.

You can remove or sample data from a pandas DataFrame using indexing or the sample() method.

# Indexing
df_1000_rows = df[:1000] # get first 1000 rows of df

# Sample method
df_10_percent_sample = df.sample(frac=0.1) # get 10% random sample of df

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Programmer-RD-AI
Comment options

@mrdbourke
Comment options

@Programmer-RD-AI
Comment options

Answer selected by mrdbourke
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants