id stringlengths 7 11 | source stringclasses 1
value | category stringclasses 11
values | title stringlengths 15 214 | text stringlengths 70 30.5k | url stringlengths 57 160 | tags stringlengths 3 113 | created_at int64 1.22B 1.79B |
|---|---|---|---|---|---|---|---|
se_62856512 | stackoverflow | DATA_SCIENCE | Return datapoints over polygons using Geopandas | Return datapoints over polygons using Geopandas
I am trying to get what is the number of trips by each borough in NYC, I am using NYC Taxi Fare dataset and I have retrieved 1'500,000 datapoints. The problem is that the procedure is very very slow, are there others procedure to calculate these values, calculate number ... | https://stackoverflow.com/questions/62856512/return-datapoints-over-polygons-using-geopandas | data-science, geospatial, data-mining, spatial, geopandas | 1,594,521,260 |
se_79976438 | stackoverflow | DATA_SCIENCE | Should I remove records where pickup and dropoff locations are the same when cleaning the NYC Taxi dataset? | Should I remove records where pickup and dropoff locations are the same when cleaning the NYC Taxi dataset?
I'm working with the NYC Yellow Taxi Trip Records dataset using PySpark as part of a data engineering learning project.
During data cleaning, I noticed that some records have the same pickup and dropoff location... | https://stackoverflow.com/questions/79976438/should-i-remove-records-where-pickup-and-dropoff-locations-are-the-same-when-cle | python, pyspark, data-science, bigdata, data-mining | 1,783,423,201 |
se_48195863 | stackoverflow | DATA_SCIENCE | XGBoost running slow on my machine, is it normal? | XGBoost running slow on my machine, is it normal?
I am using XGBoost to train 1 million rows and ~15 features from Kaggle project Rossmann Store Sales. It appears very slow. It took 30 mins to train model with no parameter tuning. If I run GridSearchCV to train model with 3 folds and 6 learning rate values, it will ta... | https://stackoverflow.com/questions/48195863/xgboost-running-slow-on-my-machine-is-it-normal | python, data-science, xgboost | 1,515,617,476 |
se_71052648 | stackoverflow | DATA_SCIENCE | How to Convert JSON to be readable by Excel (Already Flattened)? | How to Convert JSON to be readable by Excel (Already Flattened)?
Here is a snippet of the code I have right now:
'0_parcel_mapicon': None,
'0_parcel_mapiconselected': None,
'0_parcel_sections_0_0_0_buildingId': 123456,
'0_parcel_sections_0_0_0_id': 123,
'0_parcel_sections_0_0_0_LandUseCode': 'R00',
'0_parc... | https://stackoverflow.com/questions/71052648/how-to-convert-json-to-be-readable-by-excel-already-flattened | python, json, excel, data-science | 1,644,421,691 |
se_79949769 | stackoverflow | DATA_SCIENCE | Problem in tensor shape difference between training and and testing data when running a CNN model | Problem in tensor shape difference between training and and testing data when running a CNN model
I have a problem when running the saved model of a CNN. When I train the model and the input tensor size of the first linear layer is set to the shape for the training data after it is flattened and went through the convo... | https://stackoverflow.com/questions/79949769/problem-in-tensor-shape-difference-between-training-and-and-testing-data-when-ru | python, deep-learning, jupyter-notebook, pytorch, data-science | 1,780,326,439 |
se_79965516 | stackoverflow | DATA_SCIENCE | What can I use stack overflow for? | What can I use stack overflow for?
I am wrapping up my B.S. in cognitive science late this year. My professor had us create a stack overflow account in our data analysis and optimization course. I unfortunately never looked into it and now I have woken up to how cut throat the job market is today.
I am super duper in... | https://stackoverflow.com/questions/79965516/what-can-i-use-stack-overflow-for | computer-vision, data-science, computer-science | 1,782,162,590 |
se_79854533 | stackoverflow | DATA_SCIENCE | General Curiosity about ai | General Curiosity about ai
Currently i am exploring about agentic ai and found some cool use-cases of it in real world and amazed to see how it's been continously growing over the market and automating simple process together into complex workflows.
Want to deep dive into it more but confused as i don't have studied d... | https://stackoverflow.com/questions/79854533/general-curiosity-about-ai | machine-learning, artificial-intelligence, data-science | 1,766,599,890 |
se_55480292 | stackoverflow | DATA_SCIENCE | Method to combine quantile regression forecasts | Method to combine quantile regression forecasts
I am predicting electricity usage for customers which is highly skewed. Regular regression models did not fit well due to skewed distribution, hence I tried quantile regression. I'm obtaining the models for 0.1, 05 and 0.9 quantiles. So I have 3 set of predictions for th... | https://stackoverflow.com/questions/55480292/method-to-combine-quantile-regression-forecasts | python, neural-network, regression, data-science, quantile-regression | 1,554,225,391 |
se_79950473 | stackoverflow | DATA_SCIENCE | Data science and machine learning | Data science and machine learning
Career change data science 40
Hello! I need according your experience
I'm 40, career changer, based in Colombia. Which data science bootcamp is worth it? Any experience with 4Geeks or similar?
Are there affordable data science courses available in Colombia, in Spanish or with subtitle... | https://stackoverflow.com/questions/79950473/data-science-and-machine-learning | javascript, python, data-science, coding-style, bootcamp | 1,780,430,209 |
se_67874022 | stackoverflow | DATA_SCIENCE | TypeError: 'value' must be an instance of str or bytes, not a float | TypeError: 'value' must be an instance of str or bytes, not a float
I'm trying to visualize two column using scatter plot but I keep got the same error and I've been tried to change the data type but it didn't work. Here my code.
fig, ax= plt.subplots(figsize=(4,6))
# Title & subtitle
fig.text(0.097,1,'land a... | https://stackoverflow.com/questions/67874022/typeerror-value-must-be-an-instance-of-str-or-bytes-not-a-float | python, dataframe, data-science, scatter-plot | 1,623,077,912 |
se_79928197 | stackoverflow | DATA_SCIENCE | How should a beginner approach learning NumPy before using it with real datasets | How should a beginner approach learning NumPy before using it with real datasets
Iβm a beginner learning NumPy and Data Science. I understand basic operations such as array creation, indexing, slicing, and simple computations.
However, when I try to follow tutorials that use NumPy with datasets (for example in scikit-... | https://stackoverflow.com/questions/79928197/how-should-a-beginner-approach-learning-numpy-before-using-it-with-real-datasets | python, numpy, data-science | 1,776,584,836 |
se_79925710 | stackoverflow | DATA_SCIENCE | Adjusting Titles to reflect a change in numerical data | Adjusting Titles to reflect a change in numerical data
Ok so there's no easy way to title this to get the information I really want to get at. But I feel like the longer winded explanation is fairly simple.
So I'm in a programming for data science class (so extremely new to programming, very base level) and working w... | https://stackoverflow.com/questions/79925710/adjusting-titles-to-reflect-a-change-in-numerical-data | python, dataframe, data-science, data-analysis | 1,776,214,099 |
se_50473381 | stackoverflow | DATA_SCIENCE | Scikit-learn's LabelBinarizer vs. OneHotEncoder | Scikit-learn's LabelBinarizer vs. OneHotEncoder
What is the difference between the two? It seems that both create new columns, which their number is equal to the number of unique categories in the feature. Then they assign 0 and 1 to data points depending on what category they are in. | https://stackoverflow.com/questions/50473381/scikit-learns-labelbinarizer-vs-onehotencoder | python, encoding, scikit-learn, data-science, categorical-data | 1,527,009,910 |
se_79918389 | stackoverflow | DATA_SCIENCE | Sklearn Pipelines, adding features and column transformers | Sklearn Pipelines, adding features and column transformers
I'm just trying out/experimenting with sklearn. I'm using the California housing dataset, and I'm trying to make a pipeline to create some additional features, then take the logarithm of some features, then scale all of the numerical features. It's pretty quic... | https://stackoverflow.com/questions/79918389/sklearn-pipelines-adding-features-and-column-transformers | python, scikit-learn, data-science | 1,775,048,341 |
se_79908408 | stackoverflow | DATA_SCIENCE | NeMo cashe-aware streaming multilingual ASR training | NeMo cashe-aware streaming multilingual ASR training
I started training nemo's hybrid rnnt ctc cashe aware streaming large multilingual model with code-switching. i wanted to ask if total 1300 hours of dataset will be enough? and somehow I noticed that in first epoch after some steps, model was predicting some words (... | https://stackoverflow.com/questions/79908408/nemo-cashe-aware-streaming-multilingual-asr-training | python, machine-learning, artificial-intelligence, data-science | 1,773,656,123 |
se_66936732 | stackoverflow | DATA_SCIENCE | How to do the ADF Test for each column of my Dataframe in Python? | How to do the ADF Test for each column of my Dataframe in Python?
I am looking for a way to do the ADF Test for multiple columns of a DataFrame. Do you have any idea?
This is my multi-column dataframe. How to calculate the test for each column separately?
Date
Acre
AmapΓ‘
ParΓ‘
RondΓ΄nia
Roraima
Tocantins
Alagoas
Bahi... | https://stackoverflow.com/questions/66936732/how-to-do-the-adf-test-for-each-column-of-my-dataframe-in-python | python, pandas, dataframe, time-series, data-science | 1,617,492,224 |
se_76650079 | stackoverflow | DATA_SCIENCE | Difference between predict() and predict_proba() functions in scikit learn | Difference between predict() and predict_proba() functions in scikit learn
After training a tree:
clf = DecisionTreeClassifier()
clf.fit(Xtrain, ytrain)
I have decided to test its performance on the training data itself (just to compare, later, with the test data, in terms of Sensitivity Specificity and ROC-AUC). But... | https://stackoverflow.com/questions/76650079/difference-between-predict-and-predict-proba-functions-in-scikit-learn | python, scikit-learn, statistics, data-science | 1,688,949,463 |
se_79861609 | stackoverflow | DATA_SCIENCE | Step wise pattern prediction of prices | Step wise pattern prediction of prices
I have sample dataset where prices are stable few days/week/months and then falls/raise and stays in that price again for few days/weeks/months.
Basically it looks like step down and up when you visualise it. How can I build a model for such patterns?
currently I am thinking of b... | https://stackoverflow.com/questions/79861609/step-wise-pattern-prediction-of-prices | machine-learning, computer-vision, artificial-intelligence, data-science | 1,767,701,854 |
se_79901491 | stackoverflow | DATA_SCIENCE | GPU-accelerated t-SNE | GPU-accelerated t-SNE
Up to this point, I have only used scikit-learnβs t-SNE algorithm. This approach takes a long time to produce good results for high-dimensional datasets with many samples. Should I consider using a GPU-accelerated option? If so, which libraries or models would you recommend. | https://stackoverflow.com/questions/79901491/gpu-accelerated-t-sne | machine-learning, data-science, tsne | 1,772,708,660 |
se_69707809 | stackoverflow | DATA_SCIENCE | Using DeepAR GPU | Using DeepAR GPU
I am using Gluonts for building DeepAR model but takes lot of time to run the training object eventhough I use cox = 'gpu' but throws an error. My machine has GPU but the option didn't work. Any help is much appreciated... | https://stackoverflow.com/questions/69707809/using-deepar-gpu | time-series, data-science, deepar | 1,635,163,750 |
se_79877585 | stackoverflow | DATA_SCIENCE | Need advice on how to handle data and find groupings using ML/AI/DS | Need advice on how to handle data and find groupings using ML/AI/DS
I have a project and I'm new with Data Science/ML/AI. Basically I have data set with list of issues and each issue there is a notes section where engineers talk to support and tell how do they solve or fix the issue. My challenge is I need to identify... | https://stackoverflow.com/questions/79877585/need-advice-on-how-to-handle-data-and-find-groupings-using-ml-ai-ds | machine-learning, artificial-intelligence, data-science, k-means | 1,769,567,971 |
se_79867824 | stackoverflow | DATA_SCIENCE | How do I randomize what rows I import from an SAS file? | How do I randomize what rows I import from an SAS file?
The files are over 100gb and I want 1000 observations but not the first 1000, how can I make sure it's randomized before/while importing so that not all of it has to be loaded in?
data <- lapply(files, read_sas, n_max = 1000)
EDIT/UPDATE:
I apologize for the lack... | https://stackoverflow.com/questions/79867824/how-do-i-randomize-what-rows-i-import-from-an-sas-file | r, import, sas, data-science, r-haven | 1,768,400,562 |
se_72404872 | stackoverflow | DATA_SCIENCE | Remove rows in a 2d-numpy array if they contain a specific element | Remove rows in a 2d-numpy array if they contain a specific element
I have a matrix as 2d-np.array and I would like to remove all rows that contain an element x in a specific column. My goal is to return a matrix without these rows, so it should be smaller.
My function looks like this:
def delete_rows(matrix, x, col):
... | https://stackoverflow.com/questions/72404872/remove-rows-in-a-2d-numpy-array-if-they-contain-a-specific-element | python, arrays, numpy, matrix, data-science | 1,653,651,601 |
se_57847495 | stackoverflow | DATA_SCIENCE | How to fix function with for loop not iterating. Recommendation system in Python | How to fix function with for loop not iterating. Recommendation system in Python
I'm working on a recommendation system with the python library Surprise.
I'm trying to make a function that iterates over the full list of movies and predicts their ranking value against a user id which is defined in when I call the funct... | https://stackoverflow.com/questions/57847495/how-to-fix-function-with-for-loop-not-iterating-recommendation-system-in-python | python, pandas, machine-learning, data-science, recommendation-engine | 1,567,999,344 |
se_79449168 | stackoverflow | DATA_SCIENCE | MiniBatchKMeans BERTopic not returning topics for half of data | MiniBatchKMeans BERTopic not returning topics for half of data
I am trying to topic a dataset of tweets. I have around 50 million tweets. Unfortunately, such a large dataset will not fit in ram (even 128GB) due to the embeddings. Therefore, I have been working on making an incremental BERTopic as per the docs
As such:... | https://stackoverflow.com/questions/79449168/minibatchkmeans-bertopic-not-returning-topics-for-half-of-data | python, machine-learning, nlp, data-science, topic-modeling | 1,739,900,579 |
se_79858873 | stackoverflow | DATA_SCIENCE | Data leakage concerns when using logistic regression probabilities for sentiment scoring | Data leakage concerns when using logistic regression probabilities for sentiment scoring
I am currently analyzing sentiment in Google Maps reviews about public parks in order to create a score for each park. I am using Word2Vec and logistic regression. The logistic regression model is not trained for prediction purpos... | https://stackoverflow.com/questions/79858873/data-leakage-concerns-when-using-logistic-regression-probabilities-for-sentiment | data-science, sentiment-analysis | 1,767,316,719 |
se_79847627 | stackoverflow | DATA_SCIENCE | what are validation checks that are made inorder to push a data to reject folder in medallion architecture? | what are validation checks that are made inorder to push a data to reject folder in medallion architecture?
In my dataset, I noticed that the actual data type of a column differs from the expected data type.In this situation, should the data be type-cast during processing, or should such records be moved to a Reject f... | https://stackoverflow.com/questions/79847627/what-are-validation-checks-that-are-made-inorder-to-push-a-data-to-reject-folder | data-science, databricks, azure-databricks, data-ingestion, data-engineering | 1,765,797,960 |
se_79817331 | stackoverflow | DATA_SCIENCE | I'm a beginner in data science feeling lost with Python - how should I practice? | I'm a beginner in data science feeling lost with Python - how should I practice?
I'm very new to data science and have just started learning Python. I come from a non-programming background, and I'm finding it quite challenging to understand how to properly practice and improve.
I've learned the basic syntax of Py... | https://stackoverflow.com/questions/79817331/im-a-beginner-in-data-science-feeling-lost-with-python-how-should-i-practice | python, data-science, project, open-source | 1,762,921,001 |
se_56390822 | stackoverflow | DATA_SCIENCE | How to use fancyimpute on PyCharm | How to use fancyimpute on PyCharm
I've installed fancyimpute on Anaconda with pip install fancyimpute through the Anaconda terminal but I use PyCharm with Anaconda as its interpreter. I couldn't find a way to use fancyimpute in PyCharm. I searched for it through Settings/Project Interpreter/Available Packages but no... | https://stackoverflow.com/questions/56390822/how-to-use-fancyimpute-on-pycharm | python, anaconda, data-science, jetbrains-ide | 1,559,288,654 |
se_79806146 | stackoverflow | DATA_SCIENCE | How should I balance DSA, ML fundamentals, PyTorch implementation, and Kaggle practice for ML Engineer interviews? | How should I balance DSA, ML fundamentals, PyTorch implementation, and Kaggle practice for ML Engineer interviews?
Iβm a Computer Science graduate preparing for ML/AI Engineer roles.
Iβm facing a dilemma about what to focus on, how much to allocate time to each area, and what exact roadmap to follow to prepare effecti... | https://stackoverflow.com/questions/79806146/how-should-i-balance-dsa-ml-fundamentals-pytorch-implementation-and-kaggle-pr | machine-learning, pytorch, data-science, kaggle, advice | 1,761,939,345 |
se_61685878 | stackoverflow | DATA_SCIENCE | Sense of Upper Confidence Bound algorithm | Sense of Upper Confidence Bound algorithm
I watched a tutorial about UCB at Udemy and didn't saw the sense of using that algorithm.
For example, you have 10 commercial and you know 10000 user's behavior (click or not). You use UCB to know the best commercial of those 10. But you also can count all clicks and get the ... | https://stackoverflow.com/questions/61685878/sense-of-upper-confidence-bound-algorithm | machine-learning, math, data-science | 1,588,963,222 |
se_72188059 | stackoverflow | DATA_SCIENCE | Extracting City and State from a column in CSV using python | Extracting City and State from a column in CSV using python
917 1st St, Dallas, TX 75001
682 Chestnut St, Boston, MA 02215
669 Spruce St, Los Angeles, CA 90001
669 Spruce St, Los Angeles, CA 90001
so, i'm trying to extract the city and state from the given data...
def get_city_state(address):
asplit = address.spl... | https://stackoverflow.com/questions/72188059/extracting-city-and-state-from-a-column-in-csv-using-python | python, pandas, csv, data-science | 1,652,192,398 |
se_75397433 | stackoverflow | DATA_SCIENCE | How to create non-alphabetically ordered Categorical column in Polars Dataframe? | How to create non-alphabetically ordered Categorical column in Polars Dataframe?
In Pandas, you can create an "ordered" Categorical column from existing string column as follows:
column_values_with_custom_order = ["B", "A", "C"]
df["Column"] = pd.Categorical(df.Column, categories=column_values_with_custom_order, orde... | https://stackoverflow.com/questions/75397433/how-to-create-non-alphabetically-ordered-categorical-column-in-polars-dataframe | python, dataframe, data-science, python-polars, categorical-data | 1,675,939,344 |
se_60197113 | stackoverflow | DATA_SCIENCE | pandas calculate delta time | pandas calculate delta time
Here's some code where that will generate some random data, and chart plus lines representing 30th & 90th percentiles.
import pandas as pd
import numpy as np
from numpy.random import randint
import matplotlib.pyplot as plt
%matplotlib inline
np.random.seed(10) # added for reproductibility... | https://stackoverflow.com/questions/60197113/pandas-calculate-delta-time | python, pandas, data-science | 1,581,542,785 |
se_67824287 | stackoverflow | DATA_SCIENCE | Color Prediction System with OpenCv Python | Color Prediction System with OpenCv Python
Hi I am an initial stage developer trying to make a color prediction system, but I came up with some error that I can not understand. I think you could help me with this .... I will share with you my proper code
This is the error: IndexError: index 1 is out of bounds for axis... | https://stackoverflow.com/questions/67824287/color-prediction-system-with-opencv-python | python, opencv, data-science, knn | 1,622,733,797 |
se_61854550 | stackoverflow | DATA_SCIENCE | Pandas Compare two data frames and look for duplicate elements | Pandas Compare two data frames and look for duplicate elements
I want to compare df and df_equal.
df contains several individual data frames
import pandas as pd
df1 = pd.DataFrame([[ 'b', 'b', 'b' ]],
columns=['a', 'b', 'c'])
Output:
a b c
0 b b b
df2 = pd.DataFrame([[ 'x', 'x', ... | https://stackoverflow.com/questions/61854550/pandas-compare-two-data-frames-and-look-for-duplicate-elements | python, pandas, data-science, equality | 1,589,730,474 |
se_79188730 | stackoverflow | DATA_SCIENCE | Does polars load the entire parquet into the memory if we want to retrive certain column? | Does polars load the entire parquet into the memory if we want to retrive certain column?
I am new to the data science. I am working on the Polars to read the parquet files. Total size of all these parquet files is 240 GB. I have an EC2 machine with 64 GB and 8 vCP.
I was under the assumption that as Parquet is a colu... | https://stackoverflow.com/questions/79188730/does-polars-load-the-entire-parquet-into-the-memory-if-we-want-to-retrive-certai | python, dataframe, data-science, parquet, python-polars | 1,731,587,142 |
se_79681718 | stackoverflow | DATA_SCIENCE | Normalizing large free text input data | Normalizing large free text input data
Here is the case, i have data coming from free text input source, it is related to the degree and education level of the users
There are many typos, many crazy stuff going on in the data, there are over 10m records, the data could be anything from typos, some their industry, some... | https://stackoverflow.com/questions/79681718/normalizing-large-free-text-input-data | python, machine-learning, nlp, data-science, spell-checking | 1,751,016,774 |
se_43697240 | stackoverflow | DATA_SCIENCE | How can I split a Dataset from a .csv file for Training and Testing? TypeError: 'list' object is not callable | How can I split a Dataset from a .csv file for Training and Testing? TypeError: 'list' object is not callable
I'm using Python and I need to split my .csv imported data in two parts, a training and test set, E.G 70% training and 30% test.
I keep getting various errors, such as 'list' object is not callable a... | https://stackoverflow.com/questions/43697240/how-can-i-split-a-dataset-from-a-csv-file-for-training-and-testing-typeerror | python, csv, split, data-science, typeerror | 1,493,478,801 |
se_68330838 | stackoverflow | DATA_SCIENCE | Counting events between sequential stages in a process using R | Counting events between sequential stages in a process using R
I've been trying to resolve an exercise from a textbook where I am faced with the challenge of count different events between sequential stages of an industrial process.
Information related to the process: A test Subject is made to go through a 3 stage pro... | https://stackoverflow.com/questions/68330838/counting-events-between-sequential-stages-in-a-process-using-r | r, algorithm, count, data-science, data-wrangling | 1,625,944,370 |
se_73081631 | stackoverflow | DATA_SCIENCE | Excel Product Categorization in Python | Excel Product Categorization in Python
I'm trying to break up Product names into categories, for example if the product is "Demi Baguette", the category should be "Baguette" and sub category "Demi". I have looked at NLP articles but nothing seems to be what I need as they all focus on sentences and text.
I've seen oth... | https://stackoverflow.com/questions/73081631/excel-product-categorization-in-python | python, excel, machine-learning, data-science, data-analysis | 1,658,498,655 |
se_65701317 | stackoverflow | DATA_SCIENCE | How to visualise and choose parameters spectrogram tensorflow | How to visualise and choose parameters spectrogram tensorflow
I have audio of 3 min duration ,I have Waveform shape: (2880000,) so what should be the value for frame_length and frame_step
spectrogram = tf.signal.stft(waveform, frame_length=?, frame_step=?)
spectrogram = tf.abs(spectrogram)
On choosing frame_length=... | https://stackoverflow.com/questions/65701317/how-to-visualise-and-choose-parameters-spectrogram-tensorflow | python, tensorflow, machine-learning, data-science, tensorflow2.0 | 1,610,538,305 |
se_75945585 | stackoverflow | DATA_SCIENCE | Merge the duplicate rows on multiple column? | Merge the duplicate rows on multiple column?
Sample Input:
DID FIRST NAME MIDDLE NAME LAST NAME STREET CITY STATE ZIP DOB PIN TIN
CRA0012347129 John JR Nan Doe Nan Nan Nan 1124.0 02-07-2020 12345678998765432 268869162.0
CRA0012347152 John Nan ... | https://stackoverflow.com/questions/75945585/merge-the-duplicate-rows-on-multiple-column | python, pandas, machine-learning, data-science, data-manipulation | 1,680,751,627 |
se_72016494 | stackoverflow | DATA_SCIENCE | Creating a image dataset | Creating a image dataset
I have a folder with 38000 images and I'm trying to create a dataset from them to use in a Convolutional LSTM, which supports input in the format of a 5d array (B,T,W,H,C) where B is the number of samples, T is the size of the samples and the rest of the array are the image properties.
So far ... | https://stackoverflow.com/questions/72016494/creating-a-image-dataset | python, arrays, machine-learning, deep-learning, data-science | 1,650,986,397 |
se_60776759 | stackoverflow | DATA_SCIENCE | How to achieve regression model without underfitting or overfitting | How to achieve regression model without underfitting or overfitting
I have my university project and i'm given a dataset which almost all features have a very weak (only 1 feature has moderate correlation with the target) correlation with the target. It's distribution is not normal too. I already tried to apply simple... | https://stackoverflow.com/questions/60776759/how-to-achieve-regression-model-without-underfitting-or-overfitting | python, machine-learning, data-science | 1,584,716,941 |
se_72935959 | stackoverflow | DATA_SCIENCE | Prediction on new data after pickling on regression model | Prediction on new data after pickling on regression model
I have created ridge regression model to predict sales of an item say X. My final model contains around 180 features. I have pickled this model and now I want to see how model I created is performing on new data set containing same features as present in differ... | https://stackoverflow.com/questions/72935959/prediction-on-new-data-after-pickling-on-regression-model | python, machine-learning, data-science, linear-regression | 1,657,529,786 |
se_76196650 | stackoverflow | DATA_SCIENCE | How do I write a python code for Linear regression with omitted variables? | How do I write a python code for Linear regression with omitted variables?
Generate random data for a linear regression with omitted variables and make two independent variables that are correlated with each other and make one dependent variable that is correlated with both independent variables.
Is this correct appro... | https://stackoverflow.com/questions/76196650/how-do-i-write-a-python-code-for-linear-regression-with-omitted-variables | python, machine-learning, data-science, linear-regression, correlation | 1,683,501,207 |
se_79693109 | stackoverflow | DATA_SCIENCE | In "statsmodels" Python library, why does z-test not require Population standard deviation? | In "statsmodels" Python library, why does z-test not require Population standard deviation?
So to execute a z-test in python, I have seen people doing:
from statsmodels.stats.weightstats import ztest as ztest
# IQ levels of 20 patients post medication
data = [88, 92, 94, 94, 96, 97, 97, 97, 99, 99,
... | https://stackoverflow.com/questions/79693109/in-statsmodels-python-library-why-does-z-test-not-require-population-standard | python, statistics, data-science, statsmodels | 1,751,903,158 |
se_51988030 | stackoverflow | DATA_SCIENCE | sklearn StandardScaler, doesn't allow direct transform, we need to fit_transform | sklearn StandardScaler, doesn't allow direct transform, we need to fit_transform
What is the difference between fit_transform and transform?
Why doesn't transform directly works?
from sklearn.preprocessing import StandardScaler
X_scaler = StandardScaler()
X_train = X_scaler.fit_transform(X_train)
X_test = X_s... | https://stackoverflow.com/questions/51988030/sklearn-standardscaler-doesnt-allow-direct-transform-we-need-to-fit-transform | python-3.x, machine-learning, scikit-learn, data-science | 1,535,034,049 |
se_46728937 | stackoverflow | DATA_SCIENCE | Retrieve final hidden activation layer output from sklearn's MLPClassifier | Retrieve final hidden activation layer output from sklearn's MLPClassifier
I would like to do some tests with neural network final hidden activation layer outputs using sklearn's MLPClassifier after fitting the data.
for example, If I create a classifier, assuming data X_train with labels y_train and two hidden l... | https://stackoverflow.com/questions/46728937/retrieve-final-hidden-activation-layer-output-from-sklearns-mlpclassifier | python, machine-learning, scikit-learn, classification, data-science | 1,507,894,282 |
se_60191092 | stackoverflow | DATA_SCIENCE | "blue is not a valid ColorBrewer code" Error while creating Choropleth using Folium (Python) | "blue is not a valid ColorBrewer code" Error while creating Choropleth using Folium (Python)
I am trying to create a choropleth using Folium, however I am running to the error mentioned above.
Here is my dataframe:
Here is my GeoJSON snippet for 'MISSION' district:
...{
"type": "Feature",
"prope... | https://stackoverflow.com/questions/60191092/blue-is-not-a-valid-colorbrewer-code-error-while-creating-choropleth-using-fol | python, data-visualization, data-science, folium | 1,581,519,279 |
se_64190451 | stackoverflow | DATA_SCIENCE | Combinatorics 1 to 1 mapping for Power Groups | Combinatorics 1 to 1 mapping for Power Groups
Problem description
I'm working on making a function which gives me a definition for a particular combination of several descriptors based on a single index.
My inputs are a set of raw features
X = [feat0,feat1,feat2,feat3,feat4]
a list of powers to be used
pow = [1,2,3]
... | https://stackoverflow.com/questions/64190451/combinatorics-1-to-1-mapping-for-power-groups | python, algorithm, data-science, combinatorics | 1,601,775,366 |
se_74430924 | stackoverflow | DATA_SCIENCE | Reservoir Sampling, except I can't hold the sample in memory | Reservoir Sampling, except I can't hold the sample in memory
Is there an algorithm such as Reservoir Sampling (algorithm that randomly chooses an item from a stream such that each item is equally likely to be selected), but once an item is selected it is yielded (and therefore cannot be overridden)?
i.e, not only ... | https://stackoverflow.com/questions/74430924/reservoir-sampling-except-i-cant-hold-the-sample-in-memory | python, algorithm, data-science, sampling, reservoir-sampling | 1,668,425,339 |
se_79716022 | stackoverflow | DATA_SCIENCE | Using qKnowledgeGradient with SaasFullyBayesianSingleTaskGP gives shape mismatch error | Using qKnowledgeGradient with SaasFullyBayesianSingleTaskGP gives shape mismatch error
Iβm trying to use qKnowledgeGradient with a fully Bayesian SAAS (Sparse Axis Aligned Subspace) GP (Gaussian Process) (using SaasFullyBayesianSingleTaskGP) in BoTorch. I'm doing so by writing a new class that inherits from both Saas... | https://stackoverflow.com/questions/79716022/using-qknowledgegradient-with-saasfullybayesiansingletaskgp-gives-shape-mismatch | python, debugging, data-science, bayesian, botorch | 1,753,566,287 |
se_71101956 | stackoverflow | DATA_SCIENCE | fitting on X_train and y_train | fitting on X_train and y_train
For somebody super beginner how can one remember what to pass into model.fit?
I have to keep on looking up that we are supposed to pass X_train, y_train.
But I guess I don't fully understand why we don't pass in something else such as:
X_train, y_test.
Thank you!
Josh | https://stackoverflow.com/questions/71101956/fitting-on-x-train-and-y-train | python, machine-learning, data-science | 1,644,764,900 |
se_43147960 | stackoverflow | DATA_SCIENCE | R - select only factor columns of dataframe | R - select only factor columns of dataframe
I am trying to select only factor columns from my data frame. Example is below:
bank[,apply(bank[,names(bank)!="id"], is.factor)]
But the code behaves strangely. Step by step:
sapply(bank[,names(bank)!="id"], is.factor)
I get:
age sex region income ... | https://stackoverflow.com/questions/43147960/r-select-only-factor-columns-of-dataframe | r, dataframe, data-science, data-cleaning | 1,490,987,225 |
se_62508967 | stackoverflow | DATA_SCIENCE | Python iterforest has no attribute IterImput | Python iterforest has no attribute IterImput
Executing the following code:
from ycimpute.imputer import iterforest
dff = iterforest.IterImput().complete(n_df)
I am having this error:
AttributeError: module 'ycimpute.imputer.iterforest' has no attribute 'IterImput'
I tried to search but I think there is not a lot of... | https://stackoverflow.com/questions/62508967/python-iterforest-has-no-attribute-iterimput | python, pandas, data-science | 1,592,809,072 |
se_76384247 | stackoverflow | DATA_SCIENCE | How can I separate data in a MATLAB dat file into proper columns? | How can I separate data in a MATLAB dat file into proper columns?
I am trying to read a dat file in MATLAB but my data is not correctly separated into columns. All of the data is in one single column.
I am not sure how to separate them into proper columns
What I am trying to do is to have the data separated into colum... | https://stackoverflow.com/questions/76384247/how-can-i-separate-data-in-a-matlab-dat-file-into-proper-columns | dataframe, matlab, data-science | 1,685,639,687 |
se_79684073 | stackoverflow | DATA_SCIENCE | Identify a column cell and perform subtraction with the same column | Identify a column cell and perform subtraction with the same column
This is just a small example DataFrame, but in reality, Iβm working with a much larger and uneven dataset. I need to identify the data in pattern to perform subtraction within the same column. Please take a look at my attempt and the expected result b... | https://stackoverflow.com/questions/79684073/identify-a-column-cell-and-perform-subtraction-with-the-same-column | python, pandas, data-science | 1,751,232,383 |
se_79656070 | stackoverflow | DATA_SCIENCE | How can I scrape content that's loaded dynamically on Sainsbury's product pages? | How can I scrape content that's loaded dynamically on Sainsbury's product pages?
Trying to build a scraper that extracts nutritional information from each product page on Sainsbury (for eg, scraping energy values out of https://www.sainsburys.co.uk/gol-ui/product/sainsburys-british-filtered-whole-milk-2l).
The... | https://stackoverflow.com/questions/79656070/how-can-i-scrape-content-thats-loaded-dynamically-on-sainsburys-product-pages | html, web-scraping, beautifulsoup, scrapy, data-science | 1,749,220,327 |
se_64098165 | stackoverflow | DATA_SCIENCE | Python: finding outliers from a trend of data | Python: finding outliers from a trend of data
Notice this post is not duplicated to any of the following relevant pieces on SO:
Find The Parity Outlier Python
Python: Find outliers inside a list
Find outlier using z score
I was given data in an experiment:
import matplotlib.pyplot as plt
x = [22, 24... | https://stackoverflow.com/questions/64098165/python-finding-outliers-from-a-trend-of-data | python, matplotlib, regression, data-science, outliers | 1,601,280,111 |
se_74255852 | stackoverflow | DATA_SCIENCE | How can I check an adjacent cell is non empty if one cell on the same row is empty? | How can I check an adjacent cell is non empty if one cell on the same row is empty?
I can't seem to figure out how do I check it and return values if its empty. For example if a roll no. in roll number column is filled I want to check the same row has a name under name column. If not, I want to return "NO".
value2=u_o... | https://stackoverflow.com/questions/74255852/how-can-i-check-an-adjacent-cell-is-non-empty-if-one-cell-on-the-same-row-is-emp | pandas, dataframe, data-science | 1,667,155,794 |
se_79665899 | stackoverflow | DATA_SCIENCE | Pandas dropna(how="all", inplace=True) doesn't work | Pandas dropna(how="all", inplace=True) doesn't work
df.dropna(how="all", inplace=True) does not remove all full NaN columns/rows that are in my dataframe.
I created a matrix of every distance between the values in a list.
0 1 2 3 4
0 0.000000,1.003090,7.006241,8.985008... | https://stackoverflow.com/questions/79665899/pandas-dropnahow-all-inplace-true-doesnt-work | python, pandas, dataframe, data-science | 1,749,909,829 |
se_79657687 | stackoverflow | DATA_SCIENCE | Future Looking Target Variables in Light GBM | Future Looking Target Variables in Light GBM
I am working on a ML model using LightGBM classifier with a task to maximise a value( PnL) for a quantitative strategy.
I am entering a trade every Monday and can hold till Friday close.
I want to create labels to maximise optimum exit within the week
I am using the target ... | https://stackoverflow.com/questions/79657687/future-looking-target-variables-in-light-gbm | machine-learning, data-science, xgboost, algorithmic-trading | 1,749,373,278 |
se_74773713 | stackoverflow | DATA_SCIENCE | How to find the average based on the value of another column. Python/Pandas | How to find the average based on the value of another column. Python/Pandas
I want to find the average of my column'Preheat_To_Pour_Time' based on the values of the column Rampmelt_Active. Column Rampmelt_Active values are either a 1 or a 0 based on if it's active. I can't figure out how to use the values I get from .... | https://stackoverflow.com/questions/74773713/how-to-find-the-average-based-on-the-value-of-another-column-python-pandas | pandas, group-by, data-science | 1,670,860,149 |
se_79658001 | stackoverflow | DATA_SCIENCE | Need Assistance with Fine-tuning my Content Moderation Neural Network with RoBERTa. (Dataset: Jigsaw) | Need Assistance with Fine-tuning my Content Moderation Neural Network with RoBERTa. (Dataset: Jigsaw)
I can't quite figure out how to fine-tune my neural network with jigsaw and make it a multi-classifier rather than a binary-classifier (multiple types of output rather than just positive and negative) and need assista... | https://stackoverflow.com/questions/79658001/need-assistance-with-fine-tuning-my-content-moderation-neural-network-with-rober | python, pytorch, artificial-intelligence, data-science | 1,749,400,310 |
se_79067097 | stackoverflow | DATA_SCIENCE | AutoTS: Forecast with top3 models instead of best model | AutoTS: Forecast with top3 models instead of best model
I am using the AutoTS package for multivariate time series forecasting. The idea is to fit the model on a train set and forecast for validation set because I want to get metrics for each individual column. Pick top 3 models from validation and forecast for next 4... | https://stackoverflow.com/questions/79067097/autots-forecast-with-top3-models-instead-of-best-model | python, time-series, data-science, automl | 1,728,407,500 |
se_79639986 | stackoverflow | DATA_SCIENCE | Is it possible to fine-tune an LLM using LoRA on AWS ECS Fargate? | Is it possible to fine-tune an LLM using LoRA on AWS ECS Fargate?
Iβm trying to fine-tune a lightweight LLM (like TinyLlama) using LoRA for a small custom dataset, but I'm facing two major issues:
Problem 1:
When I fine-tune the model locally, Iβm unable to push the fine-tuned model folder (checkpoints, adapter weight... | https://stackoverflow.com/questions/79639986/is-it-possible-to-fine-tune-an-llm-using-lora-on-aws-ecs-fargate | amazon-web-services, data-science, large-language-model, aws-fargate | 1,748,330,587 |
se_79616449 | stackoverflow | DATA_SCIENCE | How do I do a specific aggregation on a table based on row column values on another table (SQL)? | How do I do a specific aggregation on a table based on row column values on another table (SQL)?
I have loaded two fact tables CDI and Population and a couple dimension tables in DuckDB. I did joins on the CDI fact table and its respective dimension tables which yields a snippet of the table below
And below is the Po... | https://stackoverflow.com/questions/79616449/how-do-i-do-a-specific-aggregation-on-a-table-based-on-row-column-values-on-anot | python, sql, data-science, duckdb, data-engineering | 1,746,964,313 |
se_79619491 | stackoverflow | DATA_SCIENCE | How can I filter out spikes in Kusto Engine data but also create a new baseline value if the spike value persists? | How can I filter out spikes in Kusto Engine data but also create a new baseline value if the spike value persists?
So my data is totaliser values of Engine Hours, but the values will increase/decrease by an order of magnitude for a few timestamps and then return to a real value. I want to filter out these anomalies/sp... | https://stackoverflow.com/questions/79619491/how-can-i-filter-out-spikes-in-kusto-engine-data-but-also-create-a-new-baseline | statistics, data-science, kql, azure-data-explorer | 1,747,132,352 |
se_56496708 | stackoverflow | DATA_SCIENCE | F1 Score: ValueError: Classification metrics can't handle a mix of multiclass and multilabel-indicator targets | F1 Score: ValueError: Classification metrics can't handle a mix of multiclass and multilabel-indicator targets
I have multi-class labeled text classification problem with 2000 different labels and I do classification using LSTM.
Label Encoder of target variable
LSTM layer with Embedd Layer
Error metric is F2 scor... | https://stackoverflow.com/questions/56496708/f1-score-valueerror-classification-metrics-cant-handle-a-mix-of-multiclass-an | python, machine-learning, scikit-learn, data-science, lstm | 1,559,919,337 |
se_67904715 | stackoverflow | DATA_SCIENCE | How to get all the rows corresponding to maximum values of a column using groupby | How to get all the rows corresponding to maximum values of a column using groupby
For the given dataframe df as:
Election Yr. Party States Votes
0 2000 A a 50
1 2000 A b 30
2 2000 B a 40
3 2000 B b 50
4 2000 ... | https://stackoverflow.com/questions/67904715/how-to-get-all-the-rows-corresponding-to-maximum-values-of-a-column-using-groupb | python, pandas, dataframe, data-science | 1,623,243,750 |
se_79588450 | stackoverflow | DATA_SCIENCE | Smoothening of data in excel based on certain rules | Smoothening of data in excel based on certain rules
I have following example data
The Figures depend on 3 parameters: X, Y & Rank. Out of these we are making 4 buckets. High X High Y, Low X Low Y, High X, Low Y and Low X, High Y. Then we are putting the values in each bucket and classifying them in Ranks. So for exa... | https://stackoverflow.com/questions/79588450/smoothening-of-data-in-excel-based-on-certain-rules | excel, data-science, non-linear-regression | 1,745,406,142 |
se_74494117 | stackoverflow | DATA_SCIENCE | Which algorithm combines knapsack optimization with the efficiency of job scheduling (to create a points optimizing fantasy basketball lineup) | Which algorithm combines knapsack optimization with the efficiency of job scheduling (to create a points optimizing fantasy basketball lineup)
I'm a fantasy basketball player and there is a recurring problem that I have not been able to figure out, and I can't find a similar enough example online that I can adapt for ... | https://stackoverflow.com/questions/74494117/which-algorithm-combines-knapsack-optimization-with-the-efficiency-of-job-schedu | algorithm, data-science, computer-science, mathematical-optimization, combinatorics | 1,668,797,156 |
se_79603555 | stackoverflow | DATA_SCIENCE | How to set a fixed random state in RandomizedSearchCV? | How to set a fixed random state in RandomizedSearchCV?
I'm using RandomizedSearchCV with RandomForestClassifier in scikit-learn. I want to make sure my results are reproducible across runs. Where should I set the random_stateβin the classifier, in RandomizedSearchCV, or both?
Example code:
from sklearn.ensemble import... | https://stackoverflow.com/questions/79603555/how-to-set-a-fixed-random-state-in-randomizedsearchcv | python, scikit-learn, data-science | 1,746,195,585 |
se_65749996 | stackoverflow | DATA_SCIENCE | Error non-linear-regression python curve-fit | Error non-linear-regression python curve-fit
Hello guys i want to make non-linear regression in python with curve fit
this is my code:
#fit a fourth degree polynomial to the economic data
from numpy import arange
from scipy.optimize import curve_fit
from matplotlib import pyplot
import math
x = [17.47,20.71,21.08,18.... | https://stackoverflow.com/questions/65749996/error-non-linear-regression-python-curve-fit | python, scipy, continuous-integration, data-science, non-linear-regression | 1,610,802,455 |
se_56861792 | stackoverflow | DATA_SCIENCE | When to use random forest | When to use random forest
I understand Random Forest models can be used both for classification and regression situations. Is there a more specific criteria to determine where a random forest model would perform better than common regressions (Linear, Lasso, etc) to estimate values or Logistic Regression for classific... | https://stackoverflow.com/questions/56861792/when-to-use-random-forest | python, regression, data-science, random-forest | 1,562,117,353 |
se_75279935 | stackoverflow | DATA_SCIENCE | Change the background of Text dynamically in tableau | Change the background of Text dynamically in tableau
Is there a way we could change , the color of the background in tableau dynamically.
I have just used the Text Object , in text-Object I have taken name and < parameter >%.
I would like to change color based on parameter value .
Like less than 90% be Red and more th... | https://stackoverflow.com/questions/75279935/change-the-background-of-text-dynamically-in-tableau | data-science, tableau-api, tableau-desktop, tableau-prep | 1,675,047,991 |
se_68597317 | stackoverflow | DATA_SCIENCE | I am unable to run streamlit on pycharm and spyder. I am running the latest python version on window.When I try what the code ,it says invalid syntax | I am unable to run streamlit on pycharm and spyder. I am running the latest python version on window.When I try what the code ,it says invalid syntax
#This code is used to open streamlit in browser
import streamlit
import streamlit as st
import pandas as pd
from FPL import predict_team, get_overview_data, ... | https://stackoverflow.com/questions/68597317/i-am-unable-to-run-streamlit-on-pycharm-and-spyder-i-am-running-the-latest-pyth | python-3.x, pandas, numpy, data-science, streamlit | 1,627,680,955 |
se_79582739 | stackoverflow | DATA_SCIENCE | My jupyter Notebook interface is missing "Widget" section while other people have it | My jupyter Notebook interface is missing "Widget" section while other people have it
"I'm following the same steps as my instructor, but my screen appears different compared to theirs. I've attached an image showing both screens. What could be causing this discrepancy, and how can I resolve it?"
My screen vs... | https://stackoverflow.com/questions/79582739/my-jupyter-notebook-interface-is-missing-widget-section-while-other-people-hav | python, jupyter-notebook, anaconda, data-science, jupyter-lab | 1,745,089,063 |
se_71699098 | stackoverflow | DATA_SCIENCE | Optuna LightGBM LightGBMPruningCallback | Optuna LightGBM LightGBMPruningCallback
I am getting an error on my modeling of lightgbm searching for optimal auc. Any help would be appreciated.
import optuna
from sklearn.model_selection import StratifiedKFold
from optuna.integration import LightGBMPruningCallback
def objective(trial, X, y):
param = {
... | https://stackoverflow.com/questions/71699098/optuna-lightgbm-lightgbmpruningcallback | python, python-3.x, data-science, lightgbm, optuna | 1,648,760,527 |
se_79570139 | stackoverflow | DATA_SCIENCE | Plotting real-time graphs using Matplotlib does not allow plotting second graph | Plotting real-time graphs using Matplotlib does not allow plotting second graph
I am reading data from serial port and based on that, plotting graphs using matplotlib.
The data from serial port is in format:
ecg 9.89 4.5 123 . . end psd 2.1, 33.2 3.4, 92.10 . . end fft 2.1, 33.2 3.4, 92.10 . . end
There are two differ... | https://stackoverflow.com/questions/79570139/plotting-real-time-graphs-using-matplotlib-does-not-allow-plotting-second-graph | python, matplotlib, graph, data-science | 1,744,442,418 |
se_79578485 | stackoverflow | DATA_SCIENCE | How to detect and scrape a specific language version of a multilingual publication, if available? | How to detect and scrape a specific language version of a multilingual publication, if available?
I wrote a python script for scraping data from WHO website, I wanted to retrieve Title, author name, date, pdf link and child page link from parent page (i applied some filters on parent page)
I am getting the data in CSV... | https://stackoverflow.com/questions/79578485/how-to-detect-and-scrape-a-specific-language-version-of-a-multilingual-publicati | python, web-scraping, beautifulsoup, python-requests, data-science | 1,744,864,943 |
se_79061819 | stackoverflow | DATA_SCIENCE | Check if any value in a Polars DataFrame is True | Check if any value in a Polars DataFrame is True
This is quite a simple ask but I can't seem to find any clear simplistic solution to this, feels like I'm missing something.
Let's say I have a DataFrame of type
df = pl.from_repr("""
βββββββββ¬ββββββββ¬ββββββββ
β a β b β c β
β --- β --- β --- β
β bool ... | https://stackoverflow.com/questions/79061819/check-if-any-value-in-a-polars-dataframe-is-true | python, dataframe, data-science, python-polars | 1,728,301,778 |
se_79479365 | stackoverflow | DATA_SCIENCE | in KDB q, how do you write a custom mavg that drops the top 5 and bottom 5 results before doing moving average | in KDB q, how do you write a custom mavg that drops the top 5 and bottom 5 results before doing moving average
I have a 5min table that has a score value like the table below. How can I add a new column which is the 10-period moving average which drops the highest 2 and lowest 2 scores first, and just average the 6 r... | https://stackoverflow.com/questions/79479365/in-kdb-q-how-do-you-write-a-custom-mavg-that-drops-the-top-5-and-bottom-5-resul | data-science, kdb+, q, moving-average | 1,740,931,606 |
se_79527865 | stackoverflow | DATA_SCIENCE | With kotlin-notebook, how do I use DataFrame.readCsv to parse a column of dates formatted mm/dd/yyyy? | With kotlin-notebook, how do I use DataFrame.readCsv to parse a column of dates formatted mm/dd/yyyy?
The latest release (0.15.0) of the Dataframe library for Kotlin Notebook uses the method readCsv (note: lowercase sv), and in the following code, I'm using it to read in a CSV of my Discover card financials, which has... | https://stackoverflow.com/questions/79527865/with-kotlin-notebook-how-do-i-use-dataframe-readcsv-to-parse-a-column-of-dates | kotlin, csv, data-science, kotlin-notebook, kotlin-dataframe | 1,742,665,883 |
se_74990147 | stackoverflow | DATA_SCIENCE | How to count the battery cycles using rain flow counting using python | How to count the battery cycles using rain flow counting using python
I have SOC (state of charge of a battery) when SOC 1st half cycle (0 to 100%) and 2nd half cycle (100% to 0) considering as full cycle see this figure
in my data there is no full cycles present there is half cycles and quarter cycles are there how ... | https://stackoverflow.com/questions/74990147/how-to-count-the-battery-cycles-using-rain-flow-counting-using-python | python, count, scipy, data-science | 1,672,730,629 |
se_68475269 | stackoverflow | DATA_SCIENCE | How to convert rows to columns in a Pandas groupby? | How to convert rows to columns in a Pandas groupby?
I have a table containing price data for a set of products over 6 months. Each product has a unique id (sku_id) and can be from size 6-12. We measured the price each day, and generated a table similar to the example below. Source indicates what website the price was ... | https://stackoverflow.com/questions/68475269/how-to-convert-rows-to-columns-in-a-pandas-groupby | python, pandas, database, dataframe, data-science | 1,626,894,677 |
se_37307796 | stackoverflow | DATA_SCIENCE | Fastest way to eliminate specific dates from pandas dataframe | Fastest way to eliminate specific dates from pandas dataframe
I'm working with a large data frame and I'm struggling to find an efficient way to eliminate specific dates. Note that I'm trying to eliminate any measurements from a specific date.
Pandas has this great function, where you can call:
df.ix['2016-04-22']... | https://stackoverflow.com/questions/37307796/fastest-way-to-eliminate-specific-dates-from-pandas-dataframe | python, datetime, pandas, indexing, data-science | 1,463,597,163 |
se_70301890 | stackoverflow | DATA_SCIENCE | How do I show small numbers with scientific notation in Pandas Dataframe Python? | How do I show small numbers with scientific notation in Pandas Dataframe Python?
I'm working with a dataframe that on one column has numbers of different order of magnitude, the biggest is 0.315 and the smallest is 0.xxe-28.
My problem is that when I display the pd dataframe I get this:
Small numbers are rounded to 0... | https://stackoverflow.com/questions/70301890/how-do-i-show-small-numbers-with-scientific-notation-in-pandas-dataframe-python | python, pandas, dataframe, data-science | 1,639,126,316 |
se_50849202 | stackoverflow | DATA_SCIENCE | Pandas for each group of 4 calendar months find the date on which maximum value occured | Pandas for each group of 4 calendar months find the date on which maximum value occured
For each group of 4 consecutive calendar months Need to find the date on which maximum value occured
My Dataframe looks like this. | https://stackoverflow.com/questions/50849202/pandas-for-each-group-of-4-calendar-months-find-the-date-on-which-maximum-value | pandas, datetime, data-science, pandas-groupby, data-science-experience | 1,528,947,109 |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 118