original_docstring: 
      Take dataframe and convert to Fastai databunch
      
docstring: Take dataframe and convert to Fastai databunch
docstring_tokens: Take dataframe and convert to Fastai databunch
code: def create_db(x, y, train_size=0.8, bs=96, random_state=42):
      """
      Take dataframe and convert to Fastai databunch
      """
      X_train, X_test, y_train, y_test = train_test_split(x, y, train_size=train_size)
  
      train_ds = TrainData(X_train, y_train)
      val_ds = TrainData(X_test, y_test)
  
      bs = min(bs, len(train_ds))
      val_bs = min(bs, len(val_ds))
  
      train_dl = DataLoader(train_ds, bs)
      val_dl = DataLoader(val_ds, val_bs)
  
      return DataBunch(train_dl, val_dl)
code_tokens: def create_db ( x , y , train_size = 0.8 , bs = 96 , random_state = 42 ) : X_train , X_test , y_train , y_test = train_test_split ( x , y , train_size = train_size ) train_ds = TrainData ( X_train , y_train ) val_ds = TrainData ( X_test , y_test ) bs = min ( bs , len ( train_ds ) ) val_bs = min ( bs , len ( val_ds ) ) train_dl = DataLoader ( train_ds , bs ) val_dl = DataLoader ( val_ds , val_bs ) return DataBunch ( train_dl , val_dl )
short_docstring: Take dataframe and convert to Fastai databunch
short_docstring_tokens: Take dataframe and convert to Fastai databunch
comment: """
      Take dataframe and convert to Fastai databunch
      """