Questions tagged [kaggle]

Relating to Competitions, Datasets, Kernels, Learn, or Kaggle's API.

Relating to the following Kaggle data science categories:

1115 questions
7
votes
0 answers

Hover tooltip data in seaborn and pandas

Is it possible to create some kind of hover tooltip from pandas dataframe on a linear regression plot from seaborn library? More specifically I have this code: import pandas as pd import numpy as np from pandas import Series, DataFrame import…
Alex T
  • 3,529
  • 12
  • 56
  • 105
6
votes
3 answers

cannot import name 'PartialState' from 'accelerate' when using Huggingface pipeline on Kaggle notebook?

When import pipeline from Huggingface on Kaggle notebook, from transformers import pipeline it throws this error: /opt/conda/lib/python3.10/site-packages/tensorflow_io/python/ops/__init__.py:98: UserWarning: unable to load…
alvas
  • 115,346
  • 109
  • 446
  • 738
6
votes
3 answers

Tensorflow "decode_png" keeps printing "Cleanup called..."

I'm using tensorflow to open some .png images and every image it opens, an annoying message is printed. def open_img(path): img = tf.io.read_file(path) img = tf.io.decode_png(img) return tf.image.resize(img, [IMG_HEIGHT,…
ASRodrigo
  • 311
  • 2
  • 6
6
votes
2 answers

Download file from Kaggle to Google Colab

I want to download the sign language dataset from Kaggle to my Colab. So far I always used wget and the specific zip file link, for example: !wget --no-check-certificate \ https://storage.googleapis.com/laurencemoroney-blog.appspot.com/rps.zip…
Stat Tistician
  • 813
  • 5
  • 17
  • 45
6
votes
2 answers

While converting a PIL image into a tensor why the pixels are changing?

transform = transforms.Compose([transforms.ToPILImage(), transforms.ToTensor()]) Before applying the transformation After applying the transformation Q.1 Why the pixel values are changed? Q.2 How to correct this?
atin
  • 985
  • 3
  • 11
  • 28
6
votes
0 answers

how to configure pycharm so that it will work with kaggle kernel python notebook?

I am using the latest version of pycharm, pychram pro 2.19.1.2. This version is supposed to have jupyter notebook support. I have some personal kernels on kaggle and I want to know how I can edit my kernel directly from pycharm IDE rather than…
Omer Anisfeld
  • 1,236
  • 12
  • 28
6
votes
6 answers

Kaggle datasets into jupyter notebook

I am trying to import some data from kaggle into notebook. The error I am receiving is a 401 unauthorized, however I have accepted the competition rules and I am able to download the data. This is the code I am running: from…
user113156
  • 6,761
  • 5
  • 35
  • 81
6
votes
1 answer

Pandas Value Counts With Constraint For More Than One Occurance

Working with the Wine Review Data from Kaggle here. I am able to return the number of occurrences by variety using value_counts() However, I am trying to find a quick way to limit the results to varieties and their counts where there is more than…
Michael
  • 749
  • 1
  • 8
  • 22
6
votes
3 answers

Kaggle TypeError: slice indices must be integers or None or have an __index__ method

I am trying to plot a seaborn histogram on a Kaggle notebook in this way: sns.distplot(myseries, bins=50, kde=True) but I get this error: TypeError: slice indices must be integers or None or have an __index__ method Thi is the Kaggle notebook:…
Andrea Sindico
  • 7,358
  • 6
  • 47
  • 84
6
votes
2 answers

Using lambda conditional and pandas str.contains to lump strings

Trying to learn some stuff, I'm messing around with the global shark attack database on Kaggle and I'm trying to find the best way to lump strings using a lambda function and str.contains. Basically anywhere a string contains a phrase with skin…
hselbie
  • 1,749
  • 9
  • 24
  • 40
5
votes
1 answer

How to convert a Kaggle R notebook to pdf or html?

I have a R notebook in Kaggle that I would like to convert to pdf or html. All the solutions I have found in the forums seem to be python oriented. Is there any way to get that? Is there any third-party tool to convert it to the format of my choice?
Alfonso_MA
  • 537
  • 5
  • 26
5
votes
4 answers

AttributeError: 'Simple_Imputer' object has no attribute 'fill_value_categorical'' in PyCaret

I am using PyCaret and get an error. AttributeError: 'Simple_Imputer' object has no attribute 'fill_value_categorical' Trying to create a basic instance. !pip install pycaret==1.0 from pycaret.regression import * exp_reg = setup(data=df,…
guilherme guerra
  • 161
  • 1
  • 2
  • 5
5
votes
1 answer

Unable to load model trained on Pytotch version 1.6.0 in Pytorch version 1.5.1

I have recently updated my Pytorch version to 1.6.0 on my local machine to use their mixed-precision training, since then I am encountering this issue, I have tried the solution mentioned here, but it is still throwing below error. RuntimeError:…
Rohit Singh
  • 111
  • 2
  • 7
5
votes
2 answers

ValueError: Trying to create optimizer slot variable under the scope for tf.distribute.Strategy

Please find below code for the image classification into 2 class, which I am trying to execute using Kaggle TPU's. Could you please help to figure the problem here? I have followed the guideline from the Kaggle website in order to use the GPU, but…
Nitin
  • 396
  • 7
  • 18
5
votes
2 answers

How to execute Kaggle Api commands on windows system?

I'm referring to https://github.com/Kaggle/kaggle-api I tried executing the sample commands listed on the page in windows CMD and Python's IDLE. Not sure where it should be executed or how can I go to Kaggle CLI? Eg. command: kaggle datasets list -s…
Nish
  • 71
  • 1
  • 4