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_76112027
stackoverflow
DATA_SCIENCE
CNN Model Input 0 of layer "conv2d_6" is incompatible with the layer
CNN Model Input 0 of layer "conv2d_6" is incompatible with the layer I am training a CNN model to classify a dataset with 1896 files belonging 2 classes. I create a model but when I train it i get a error message I tried to create a CNN model. I defined this: IMAGE_SIZE_1 = 1280 IMAGE_SIZE_2 = 720 BATCH_SIZE...
https://stackoverflow.com/questions/76112027/cnn-model-input-0-of-layer-conv2d-6-is-incompatible-with-the-layer
conv-neural-network, data-science
1,682,519,731
se_76097755
stackoverflow
DATA_SCIENCE
How do i get my pie chart visualisation to show original categorical values?
How do i get my pie chart visualisation to show original categorical values? I am using https://www.kaggle.com/datasets/mohamedafsal007/house-price-dataset-of-india/ to visualise the condition of house into a piechart c = df['condition_of_the_house'] explode = [0.1] * len(df.condition_of_the_house.value_counts(),) ex...
https://stackoverflow.com/questions/76097755/how-do-i-get-my-pie-chart-visualisation-to-show-original-categorical-values
machine-learning, data-science, visualization, exploratory-data-analysis
1,682,398,874
se_68160605
stackoverflow
DATA_SCIENCE
P and T peak detection in the given ECG data using python
P and T peak detection in the given ECG data using python I have a set of ECG data. In which I had to find the peaks (P,Q,R,S,T). I have referred some sources and identified the Q,R,S peaks and now I am unable to find the P,T peaks. I am totally new to python. Here is he data: <patient_details>Issac,1972-08-26,47,96,1...
https://stackoverflow.com/questions/68160605/p-and-t-peak-detection-in-the-given-ecg-data-using-python
python, python-3.x, data-science
1,624,871,496
se_76100739
stackoverflow
DATA_SCIENCE
Converting multi column header df from wide to long format in python
Converting multi column header df from wide to long format in python I would like to convert an excel file from wide format into long format. I'm reading an excel file which has not only two rows of headers, it also includes merged cells in the header. Input Example: | Task | Name | May,2022 | Jun,2022 | Jul,2022 |...
https://stackoverflow.com/questions/76100739/converting-multi-column-header-df-from-wide-to-long-format-in-python
python, pandas, dataframe, data-science
1,682,422,735
se_75968790
stackoverflow
DATA_SCIENCE
How to generate embedding for Image Dataset with multiple features?
How to generate embedding for Image Dataset with multiple features? My dataset has jewellery images. The jewellery is of 4 types: Type Color Shape Material Now I am aware of converting images to embeddings. I need to group similar images like two plain gold rings are similar but "plain gold ring with heart shape" is...
https://stackoverflow.com/questions/75968790/how-to-generate-embedding-for-image-dataset-with-multiple-features
deep-learning, pytorch, neural-network, computer-vision, data-science
1,681,014,865
se_76093738
stackoverflow
DATA_SCIENCE
&quot;ValueError: Dimensions of labels and X must be compatible&quot;, using Jupyter Notebook
&quot;ValueError: Dimensions of labels and X must be compatible&quot;, using Jupyter Notebook data = {'continent': ['Asia', 'Africa', 'Europe', 'North America', 'South America', 'Australia'], 'population_density': [150, 44, 72, 22, 25, 3]} df = pd.DataFrame(data) plt.boxplot(df['population_density'], labels=df[...
https://stackoverflow.com/questions/76093738/valueerror-dimensions-of-labels-and-x-must-be-compatible-using-jupyter-noteb
python, dataframe, jupyter-notebook, data-science, boxplot
1,682,351,286
se_76082448
stackoverflow
DATA_SCIENCE
Data Science Modeling to predict safest stock &#39;sector&#39; to invest in
Data Science Modeling to predict safest stock &#39;sector&#39; to invest in Data Science Question: Created a DataFrame with stock sectors assigned to corresponding stocks. Sectors range from Misc., Tech, Real Estate…etc. How can I create and evaluate models such as Linear Regression, Random Forest, K-Nearest Neighbors...
https://stackoverflow.com/questions/76082448/data-science-modeling-to-predict-safest-stock-sector-to-invest-in
python, data-science, data-modeling
1,682,206,844
se_76079282
stackoverflow
DATA_SCIENCE
Combine Two data frames if values on one column is equal
Combine Two data frames if values on one column is equal I need to combine two dataframes where they have similar columns however the 1st dataframe is missing one column i need to add values from 2nd dataframe to 1st display(df) id TITLE CODE PRICE 1 John 12 125 2 Katie 14 325 4 Janie 24 550 5 Jacob 32 ...
https://stackoverflow.com/questions/76079282/combine-two-data-frames-if-values-on-one-column-is-equal
python, pandas, data-science, data-analysis, data-preprocessing
1,682,161,175
se_75999459
stackoverflow
DATA_SCIENCE
How do I upload my arff file to WEKA without seeing &#39;premature end of line, read Token[EOL] line 22&#39;
How do I upload my arff file to WEKA without seeing &#39;premature end of line, read Token[EOL] line 22&#39; This error message has been appearing when I try to upload a dataset I got from twitter using snscrape: 'premature end of line, read Token[EOL] line 22' How do I resolve it? I've tried to convert the file, it k...
https://stackoverflow.com/questions/75999459/how-do-i-upload-my-arff-file-to-weka-without-seeing-premature-end-of-line-read
dataset, data-science, weka, arff
1,681,330,352
se_74425266
stackoverflow
DATA_SCIENCE
KNN: why is my variable is not defined in python?
KNN: why is my variable is not defined in python? I am working on an assignment and I run into this error. I am using python to perform an KNN on a data set. I pretty sure I defined the variable but it says otherwise. This code is written below. ` import pandas as PD import numpy as np import matplotlib.pyplot as mtp ...
https://stackoverflow.com/questions/74425266/knn-why-is-my-variable-is-not-defined-in-python
python, data-science, knn
1,668,378,433
se_76020926
stackoverflow
DATA_SCIENCE
python speech recognition showing error &quot;module recognition request failed: Internal Server Error&quot;
python speech recognition showing error &quot;module recognition request failed: Internal Server Error&quot; i was trying to conver voice into text but speech recognisition module throwing internal server error. this is my code:- import speech_recognition as s sr=s.Recognizer() print("i am your script and listening y...
https://stackoverflow.com/questions/76020926/python-speech-recognition-showing-error-module-recognition-request-failed-inte
python, python-3.x, machine-learning, data-science, speech-recognition
1,681,543,957
se_76057225
stackoverflow
DATA_SCIENCE
Replace a part of string in Pandas Data Column, replace doesn&#39;t work
Replace a part of string in Pandas Data Column, replace doesn&#39;t work I have been trying to clean my data column by taking a part of the text out. Unfortunately cannot get my head around it. I tried using the .replace method in pandas series, but that did not seem to have worked df['Salary Estimate'].str.replace(' ...
https://stackoverflow.com/questions/76057225/replace-a-part-of-string-in-pandas-data-column-replace-doesnt-work
python, pandas, dataframe, data-science
1,681,924,679
se_75031085
stackoverflow
DATA_SCIENCE
Is there any way to predict survival probability for censored objects after historical dates (prediction in future)?
Is there any way to predict survival probability for censored objects after historical dates (prediction in future)? I am trying to understand the possibilities and limitations of Survival analysis, in particular lifelines python package. I fitted the Cox Proportional Hazard Model with some rossi data and got survival...
https://stackoverflow.com/questions/75031085/is-there-any-way-to-predict-survival-probability-for-censored-objects-after-hist
python, data-science, survival-analysis, lifelines, scikit-survival
1,673,008,975
se_76049103
stackoverflow
DATA_SCIENCE
What does group = 1 do in R?
What does group = 1 do in R? I am learning R through Wickham's book and there is something that I do not completely understand. Here the code: ggplot(data = diamonds) + geom_bar(mapping = aes(x = cut, y = after_stat(prop))) So what I think happens here is that geom_bar groups by x (=cut), i.e. creates the 'levels'...
https://stackoverflow.com/questions/76049103/what-does-group-1-do-in-r
r, tidyverse, data-science
1,681,852,616
se_76037057
stackoverflow
DATA_SCIENCE
Mitigation for imblearn pipelines
Mitigation for imblearn pipelines I'm trying to mitigate unfairness for a model I trained using an imblearn pipeline with ADASYN. My pipeline looks like this: loaded_model = Pipeline(steps=[('feature_scaler', StandardScaler()), ('adasyn_resampling', ADASYN(random_state=123), ('low_var...
https://stackoverflow.com/questions/76037057/mitigation-for-imblearn-pipelines
python, data-science, imblearn, fairlearn
1,681,747,095
se_61375440
stackoverflow
DATA_SCIENCE
eli5 permuter.feature_importances_ returning all zeros
eli5 permuter.feature_importances_ returning all zeros I'm trying to get permutation importances for a RandomForestClassifier on a small sample of data, but while I can get simple feature importances, my permutation importances are coming back as all zeros. This is the code: Input1: X_train_encoded = encoder.fit_t...
https://stackoverflow.com/questions/61375440/eli5-permuter-feature-importances-returning-all-zeros
python, scikit-learn, data-science, random-forest, eli5
1,587,590,996
se_76039302
stackoverflow
DATA_SCIENCE
&#39;Vect&#39; not defined sklearn logistic regression error message
&#39;Vect&#39; not defined sklearn logistic regression error message So I have this pipeline i used for a text classifier that works fine. from sklearn.feature_extraction.text import TfidfTransformer from sklearn.feature_extraction.text import CountVectorizer from sklearn.metrics import accuracy_score from sklearn.lin...
https://stackoverflow.com/questions/76039302/vect-not-defined-sklearn-logistic-regression-error-message
python, scikit-learn, data-science, pipeline, logistic-regression
1,681,765,636
se_76033183
stackoverflow
DATA_SCIENCE
How should I learn ML libraries like Sci-kit learn
How should I learn ML libraries like Sci-kit learn I have started learning ML few days ago. I've been following a Udemy course. But I'm not actually feeling comfortable following the tutorial blindly. For example, in data preprocessing part while splitting the dataset into train and test set, they were using a functio...
https://stackoverflow.com/questions/76033183/how-should-i-learn-ml-libraries-like-sci-kit-learn
machine-learning, data-science, artificial-intelligence
1,681,720,540
se_76000692
stackoverflow
DATA_SCIENCE
Can&#39;t append nor concat two GeoDataFrames even though datas Share same CRS
Can&#39;t append nor concat two GeoDataFrames even though datas Share same CRS Basically I was going through this tutorial where we did import data from OSM and throughout modifying the data, There was basically a command to add missing Highway speed limits to Unclassified Roads. Here's the tutorial and while recreati...
https://stackoverflow.com/questions/76000692/cant-append-nor-concat-two-geodataframes-even-though-datas-share-same-crs
pandas, data-science, gis, geopandas, analysis
1,681,344,211
se_75982995
stackoverflow
DATA_SCIENCE
H2o Cluster Resources shared issue while on XGBoosts model process
H2o Cluster Resources shared issue while on XGBoosts model process I have used XGBoost for my model. i have noticed that h2o cluster not share memory while on this model process. master A server RAM utilization is very high and master B RAM utilization is very low. i checked h2o logs on both servers and noticed mas...
https://stackoverflow.com/questions/75982995/h2o-cluster-resources-shared-issue-while-on-xgboosts-model-process
linux, data-science, xgboost, h2o, h2o.ai
1,681,194,716
se_76016231
stackoverflow
DATA_SCIENCE
Remove numbers in tuples and enter them in new rows in csv
Remove numbers in tuples and enter them in new rows in csv so I have an ugly CSV file with one column and only 2 rows, but it has many tuples in it, that looks like: Column A (1, 2, 3)(4, 5, 6)(7, 8, 9) (3, 2, 1)(5, 3, 6)(9, 8, 7) and I want to have it looks like Column A Column B Column C 1 2 3 ...
https://stackoverflow.com/questions/76016231/remove-numbers-in-tuples-and-enter-them-in-new-rows-in-csv
python, csv, data-science
1,681,482,853
se_76009422
stackoverflow
DATA_SCIENCE
Python version and performance in ML
Python version and performance in ML I couldn't find any answer on that question, but does Python version really matter when you implement different ML models (like catboost or xgboost) or NN (like pytorch). I do know that these models were written on C++ and other programming languages and my question may sound quite...
https://stackoverflow.com/questions/76009422/python-version-and-performance-in-ml
python, performance, machine-learning, data-science
1,681,416,305
se_76007114
stackoverflow
DATA_SCIENCE
Problem with data type declaration in a function in Julia
Problem with data type declaration in a function in Julia I am currently trying to write some code to simulate a Lotka-Volterra model about a population of preyes and predators. I have written this code: function PP_gen(N_prey::Int128, N_pred::Int128, max_time::Int128, λ_breed::Float64, λ_interaction::Float64, λ_death...
https://stackoverflow.com/questions/76007114/problem-with-data-type-declaration-in-a-function-in-julia
julia, data-science
1,681,398,889
se_75998078
stackoverflow
DATA_SCIENCE
Why is R throwing a &quot;result would be too long a vector&quot; error when I try to download a TCGA project using TCGAbiolinks?
Why is R throwing a &quot;result would be too long a vector&quot; error when I try to download a TCGA project using TCGAbiolinks? I am trying to download the TCGA-DLBC sequencing data from GDC using Bioconductor's TCGAbiolinks library. I ran the following code query_TCGA <- GDCquery(project = 'TCGA-DLBC', ...
https://stackoverflow.com/questions/75998078/why-is-r-throwing-a-result-would-be-too-long-a-vector-error-when-i-try-to-down
r, data-science, bioinformatics
1,681,318,749
se_46162855
stackoverflow
DATA_SCIENCE
fit_transform() takes 2 positional arguments but 3 were given with LabelBinarizer
fit_transform() takes 2 positional arguments but 3 were given with LabelBinarizer I am totally new to Machine Learning and I have been working with unsupervised learning technique. Image shows my sample Data(After all Cleaning) Screenshot : Sample Data I have this two Pipline built to Clean the Data: num_attribs = lis...
https://stackoverflow.com/questions/46162855/fit-transform-takes-2-positional-arguments-but-3-were-given-with-labelbinarize
python, scikit-learn, data-science
1,505,157,131
se_75976423
stackoverflow
DATA_SCIENCE
trough detection algorithm returns peak data
trough detection algorithm returns peak data hi i have made an algorithm to detect the time taken for a wave from beginning of a trough to next through to calculate duration all separate waves but the through function keeps returning some peaks the algorithm import pandas as pd import numpy as np import peakutils # ...
https://stackoverflow.com/questions/75976423/trough-detection-algorithm-returns-peak-data
python, pandas, numpy, data-science
1,681,123,668
se_75979542
stackoverflow
DATA_SCIENCE
Can standardisation and outlier treatment be done on discrete numerical feature?
Can standardisation and outlier treatment be done on discrete numerical feature? I have a column in my dataset which has the number of payments made to the physicians. This is a discrete nunerical feature. I know that transformations and scaling can be done for continuous data. But what about discrete numerical featur...
https://stackoverflow.com/questions/75979542/can-standardisation-and-outlier-treatment-be-done-on-discrete-numerical-feature
machine-learning, data-science, transformation, data-preprocessing, discrete
1,681,149,898
se_75978088
stackoverflow
DATA_SCIENCE
Why i am getting a weird time series graph in python?
Why i am getting a weird time series graph in python? I'm doing a time series exercice. I have the following data : date(indexed) Year Salary 2000-04-30 2000 274633 2000-05-31 2000 256064 ...... ...... ...... 2023-01-31 2023 535791 2023-02-28 2023 375202 I'm trying to print the evolution of the Sal...
https://stackoverflow.com/questions/75978088/why-i-am-getting-a-weird-time-series-graph-in-python
python, pandas, time-series, data-science, data-analysis
1,681,137,933
se_75929782
stackoverflow
DATA_SCIENCE
Error loading saved model with Keras in TensorFlow 1.x: &quot;NotImplementedError: numpy() is only available when eager execution is enabled&quot;
Error loading saved model with Keras in TensorFlow 1.x: &quot;NotImplementedError: numpy() is only available when eager execution is enabled&quot; I want to run this repo (https://github.com/hfawaz/ijcnn19attacks/blob/master/src/cleverhans_tutorials/tsc_tutorial_keras_tf.py) In line 186 it tries to load a saved ML mod...
https://stackoverflow.com/questions/75929782/error-loading-saved-model-with-keras-in-tensorflow-1-x-notimplementederror-nu
python, tensorflow, data-science, hdf5
1,680,613,794
se_75442094
stackoverflow
DATA_SCIENCE
How to handle NaN values in rental price prediction project
How to handle NaN values in rental price prediction project I am working on a rental price prediction project where I web scraped data from Facebook Marketplace. When extracting the areas of the properties, I am encountering many NaN values. I am web scraping from a small city and it is unlikely that I will be able to...
https://stackoverflow.com/questions/75442094/how-to-handle-nan-values-in-rental-price-prediction-project
python, pandas, data-science, nan, missing-data
1,676,330,615
se_75622338
stackoverflow
DATA_SCIENCE
How to display greyscaled Image properly using Pilow?
How to display greyscaled Image properly using Pilow? I'm trying to open an Image using PIL in python. The code I'm running works fine with other images (and greyscale images I produced myself). But this one image file doesn't display properly. It makes the Image pixels either true White or true Black instead of a reg...
https://stackoverflow.com/questions/75622338/how-to-display-greyscaled-image-properly-using-pilow
python, python-3.x, python-imaging-library, data-science
1,677,805,879
se_75973318
stackoverflow
DATA_SCIENCE
How could i get pandas groupby not to take indices in account but values of my dataframe
How could i get pandas groupby not to take indices in account but values of my dataframe I have a dataFrame with dates and prices, for example : date price 2006 500 2007 2000 2007 3400 2006 5000 and i want to group my data by year so that i obtain : 2007 2006 2000 500 3400 5000 This is ...
https://stackoverflow.com/questions/75973318/how-could-i-get-pandas-groupby-not-to-take-indices-in-account-but-values-of-my-d
python, pandas, dataframe, data-science, data-analysis
1,681,081,634
se_75970692
stackoverflow
DATA_SCIENCE
I am getting error in deploying Deep learning model using Flask
I am getting error in deploying Deep learning model using Flask type here from flask import Flask , redirect , url_for , render_template, request import pickle import tensorflow as tf import numpy as np from tensorflow import keras from keras.models import load_model from tensorflow.keras.preprocessing.image import l...
https://stackoverflow.com/questions/75970692/i-am-getting-error-in-deploying-deep-learning-model-using-flask
machine-learning, flask, deep-learning, deployment, data-science
1,681,045,670
se_75971998
stackoverflow
DATA_SCIENCE
How to find AUC value of Decision Tree?
How to find AUC value of Decision Tree? Decision Tree I have found Misclassification rates for all the leaf nodes. samples = 3635 + 1101 = 4736, class = Cash, misclassification rate = 1101 / 4736 = 0.232. samples = 47436 + 44556 = 91992, class = Cash, misclassification rate = 44556 / 91992 = 0.484. samples = 7072 +...
https://stackoverflow.com/questions/75971998/how-to-find-auc-value-of-decision-tree
machine-learning, data-science, decision-tree, auc
1,681,062,245
se_75972526
stackoverflow
DATA_SCIENCE
How to access camera or webcam in kaggle?
How to access camera or webcam in kaggle? I tried using a webcam in Kaggle to take capture for the face detection project. but it's not working. code working well in Jupyter Notebook in the system here is the code that I'm using : cap = cv2.VideoCapture(0) for imgnum in range(number_images): print('Collectiong ...
https://stackoverflow.com/questions/75972526/how-to-access-camera-or-webcam-in-kaggle
python, data-science, webcam, face-detection, kaggle
1,681,069,362
se_75962467
stackoverflow
DATA_SCIENCE
Boxplot timeseries with dates on x axis
Boxplot timeseries with dates on x axis I've prepared a Pandas DataFrame with: df = pd.read_csv("data/pm25.csv") df['date'] = pd.to_datetime(df['date']) start_date = pd.to_datetime("2022-01-01T00:00:00.000Z") end_date = pd.to_datetime("2022-12-31T00:00:00.000Z") mask = (df['date'] >= start_date) & (df['date'] <= end_...
https://stackoverflow.com/questions/75962467/boxplot-timeseries-with-dates-on-x-axis
python, pandas, matplotlib, data-science, boxplot
1,680,908,341
se_75953860
stackoverflow
DATA_SCIENCE
Finding all possible sums of three integers within a list
Finding all possible sums of three integers within a list I need to use a list of perfect cubes to find all possible sums of three different numbers within that list. The sum must also be a perfect cube. My original solution was to nest 3 for loops to cover each number, but this tends to become quite inefficient, as t...
https://stackoverflow.com/questions/75953860/finding-all-possible-sums-of-three-integers-within-a-list
python, algorithm, data-science
1,680,815,848
se_75950073
stackoverflow
DATA_SCIENCE
Pandas: Different behavior of merge in pandas version 1.1.5 and 1.2.0
Pandas: Different behavior of merge in pandas version 1.1.5 and 1.2.0 mapping = pd.merge( df_1, df_2, how="left", on=["DLM"] ) The above code executes and does the job done for pandas version 1.1.5 but the code doesn't work for pandas 1.2.0 or above, it doesn't throw any error but even though there will b...
https://stackoverflow.com/questions/75950073/pandas-different-behavior-of-merge-in-pandas-version-1-1-5-and-1-2-0
python, pandas, data-science
1,680,787,502
se_75945944
stackoverflow
DATA_SCIENCE
token is missing from jupyter lab
token is missing from jupyter lab I have attached two images above and neither of them shows a token. When I try to access this jupyter lab from my local host, it asks for a password/token. Can you guys help me? Thanks in advance I have tried jupyter lab list as image attached above it is also not showing a token.
https://stackoverflow.com/questions/75945944/token-is-missing-from-jupyter-lab
python, jupyter-notebook, data-science, jupyter, jupyter-lab
1,680,756,982
se_75937592
stackoverflow
DATA_SCIENCE
Randomly distribute a string in column
Randomly distribute a string in column I have a dataset in this form Name Age Aaron 42 Steve 44 Richard 29 I have to create a new column and I have to fill that column using strings.. The column name will be 'vaccinated_or_not' and it should have values 'Yes', 'No', 'Info Missing', 'Not Provide...
https://stackoverflow.com/questions/75937592/randomly-distribute-a-string-in-column
pandas, data-science
1,680,685,613
se_75931945
stackoverflow
DATA_SCIENCE
Is there any neat way to slice and combine dataframes?
Is there any neat way to slice and combine dataframes? I have at the moment 4 dataframes each in which I have 4 variables "Hardness [N]", "Thickness [mm]" , "Weight [mg]" and "Diameter [mm]". I wish to filter the data from each of these variables using only the data within the 10th and 90th percentile for each variabl...
https://stackoverflow.com/questions/75931945/is-there-any-neat-way-to-slice-and-combine-dataframes
python, dataframe, data-science, filtering
1,680,627,225
se_75867972
stackoverflow
DATA_SCIENCE
Pandas - Irregular time series data - Compare row to next 8 hours of rows
Pandas - Irregular time series data - Compare row to next 8 hours of rows Right now I am using pandas to analyze call center data. The data is structured as followed: call_time = pd.to_datetime([ '2020-01-01 01:00:00', '2020-01-01 09:00:00', '2020-01-01 01:00:00', '2020-01-01 03:00...
https://stackoverflow.com/questions/75867972/pandas-irregular-time-series-data-compare-row-to-next-8-hours-of-rows
python, pandas, time-series, data-science, data-analysis
1,680,015,952
se_75911945
stackoverflow
DATA_SCIENCE
need to find peak duration of the data
need to find peak duration of the data I have a stream of data in a csv file that signifies the time with date in the 1st column and value in the 2nd column. The data is plotted below. I need to write an algorithm that gives me an array with time according to how long the peak lasted here is the graph here is some o...
https://stackoverflow.com/questions/75911945/need-to-find-peak-duration-of-the-data
python, pandas, numpy, data-science, peak-detection
1,680,437,547
se_75913374
stackoverflow
DATA_SCIENCE
Selenium returns empty values
Selenium returns empty values Can you help me to solve the follow issue? I'm creating a function with Selenium to scrape some jobs from Glassdor, but even though I'm using the correct XPath to get the "salary estimate" it just returns the except results. xpath = './/span[@class="css-18034rf e1wijj242"]' try: sal...
https://stackoverflow.com/questions/75913374/selenium-returns-empty-values
python, selenium-webdriver, web-scraping, xpath, data-science
1,680,454,283
se_44522750
stackoverflow
DATA_SCIENCE
Optimizing over two loss functions in difrent ranges.
Optimizing over two loss functions in difrent ranges. I am optimizing over two loss functions which take very different values. To give an example: loss1 = 1534 loss2 = 0.723 and I want to optimize over loss1+loss2. Would rescaling loss1 to values closer to loss2 be a good idea? I tried the naive way of just multi...
https://stackoverflow.com/questions/44522750/optimizing-over-two-loss-functions-in-difrent-ranges
optimization, data-science, loss, cost-based-optimizer
1,497,359,965
se_75907278
stackoverflow
DATA_SCIENCE
What is the issue here ? i have already installed geopandas and folium from pip install command from powershell
What is the issue here ? i have already installed geopandas and folium from pip install command from powershell I was getting ready to perform a EDA on Tsunami Data as I was importing the following module geopandas module gave the error of not found so i installed it from the powershell by using pip but then too the e...
https://stackoverflow.com/questions/75907278/what-is-the-issue-here-i-have-already-installed-geopandas-and-folium-from-pip
python, jupyter-notebook, anaconda, data-science, visualization
1,680,364,385
se_75690153
stackoverflow
DATA_SCIENCE
Prince &quot;FAMD object has no attribute &#39;plot_row_coordinates&#39;&quot;
Prince &quot;FAMD object has no attribute &#39;plot_row_coordinates&#39;&quot; As far as I can tell, this is the same implementation as every example of this function that I could find. Calling famd.plot_row_coordinates() produces: 'FAMD' object has no attribute 'plot_row_coordinates'. The prior lines run fine. #FAMD ...
https://stackoverflow.com/questions/75690153/prince-famd-object-has-no-attribute-plot-row-coordinates
python, data-science, pca
1,678,396,829
se_75883196
stackoverflow
DATA_SCIENCE
Assign a number vector to each group of unique values in R df
Assign a number vector to each group of unique values in R df I have a df with 2 million (2m) rows, which contains a column of different entries grouped by unique IDs. For e.g df <- df %>% mutate(A = c(1,1,1,1,1,1,2,2,2,2,2,2,2,3,3,3,3,3,3,4,4,4,4,4,5,5,5,5,5,5,6,6,6,6 6, ... , 2m, 2m, 2m, 2m) I want to create anothe...
https://stackoverflow.com/questions/75883196/assign-a-number-vector-to-each-group-of-unique-values-in-r-df
r, data-science, economics
1,680,135,864
se_72446219
stackoverflow
DATA_SCIENCE
Calculating summation over months of pandas dataframe
Calculating summation over months of pandas dataframe I have a pandas dataframe given below: ID Year R1 R1_f KAR1 20201001 1 5 KAR1 20201101 2 6 KAR1 20201201 3 7 KAR1 20210101 4 8 KAR1 20210201 5 9 KAR1 20210301 6 10 KAR1 20210401 7 11 KAR1 20210...
https://stackoverflow.com/questions/72446219/calculating-summation-over-months-of-pandas-dataframe
python, pandas, time-series, data-science
1,653,993,210
se_75885521
stackoverflow
DATA_SCIENCE
How to add a dataframe to another on python
How to add a dataframe to another on python So I have 3 columns. ETA (eta/km*100) (a number), Climate, and month. My purpose is to drop the values higher that 0.95 quartile and lower than 0.05 (the extreme cases on this dataset) for each subset of 3 months and Climate, and the reagroup the dataset on a single dataset....
https://stackoverflow.com/questions/75885521/how-to-add-a-dataframe-to-another-on-python
python, pandas, dataframe, dataset, data-science
1,680,162,974
se_75863694
stackoverflow
DATA_SCIENCE
Apply a multiplication to random elements on my dataframe
Apply a multiplication to random elements on my dataframe So what I want is to randomly chose a given amount of elements on my dataframe, and to those elements, apply an operation (which will be a multiplication by a number which will also be randomly chosen between a range) to an 'eta' column. I'm stuck on achieving ...
https://stackoverflow.com/questions/75863694/apply-a-multiplication-to-random-elements-on-my-dataframe
python, pandas, dataframe, data-science
1,679,990,518
se_75878999
stackoverflow
DATA_SCIENCE
Moving from data preprocessing to a model and hyper parameter tuning
Moving from data preprocessing to a model and hyper parameter tuning I am new to machine learning and I am having trouble with fitting a data set for a classification model. What I would like to know is after pre processing data and fitting to a model with just default hyper parameters, how much performance can I expe...
https://stackoverflow.com/questions/75878999/moving-from-data-preprocessing-to-a-model-and-hyper-parameter-tuning
machine-learning, data-science, data-cleaning, data-preprocessing
1,680,102,196
se_75879101
stackoverflow
DATA_SCIENCE
Is it possible to create your own character symbols?
Is it possible to create your own character symbols? So I have tried using private character editor for creating character symbols, but it is impossible to export them to be shared with other users. However I was wondering is there a way to create your own character set? Is there a programming language for it or diffe...
https://stackoverflow.com/questions/75879101/is-it-possible-to-create-your-own-character-symbols
character-encoding, data-science, character, ascii
1,680,102,756
se_75874318
stackoverflow
DATA_SCIENCE
Web scraping: collect chart data
Web scraping: collect chart data I am completely new to web scraping, and I've decider to go for it, by learning some basis of Python. The data I would like to collect is the chart on the following website :"https://www.amundi-ee.com/entr/product/view/QS0009102334" (no need for a login). My main project is to create a...
https://stackoverflow.com/questions/75874318/web-scraping-collect-chart-data
python, json, web-scraping, data-science, extract
1,680,074,824
se_75873898
stackoverflow
DATA_SCIENCE
How to convert empty formats: 0x0 cell to 0x0 double - in a cell array to get correct boundingbox datastore format?
How to convert empty formats: 0x0 cell to 0x0 double - in a cell array to get correct boundingbox datastore format? I am working on a project where I am trying to use a boundingbox datastore in MATLAB. I have encountered an issue where my table has a 0x0 cell format for the empty entries, that is causing an error when...
https://stackoverflow.com/questions/75873898/how-to-convert-empty-formats-0x0-cell-to-0x0-double-in-a-cell-array-to-get-co
matlab, deep-learning, data-science
1,680,071,958
se_75868196
stackoverflow
DATA_SCIENCE
Pandas Groupby only same ID and when column value is false
Pandas Groupby only same ID and when column value is false I have the following problem I am trying to solve currently. A dataframe with a lot of numerical columns consisting out of a "serial_number" column that act as ID. A column "update" that is either True or False. And also some numerical columns that I need to s...
https://stackoverflow.com/questions/75868196/pandas-groupby-only-same-id-and-when-column-value-is-false
python, pandas, dataframe, data-science, data-manipulation
1,680,017,223
se_75860385
stackoverflow
DATA_SCIENCE
What is a good way of carrying out test train split with only 4 samples, and a large number of features?
What is a good way of carrying out test train split with only 4 samples, and a large number of features? I have a dataset comprising of four samples, ~25,000 features, and two labels (it is a gene count dataset). What is a good way of splitting the data? When I run my model I am getting an accuracy of 1 on the trainin...
https://stackoverflow.com/questions/75860385/what-is-a-good-way-of-carrying-out-test-train-split-with-only-4-samples-and-a-l
python, machine-learning, data-science, train-test-split
1,679,951,290
se_75844824
stackoverflow
DATA_SCIENCE
Is it possible to have Dask return a default value if a delayed object uses too much memory?
Is it possible to have Dask return a default value if a delayed object uses too much memory? Is it possible to have Dask return a default value if a delayed object uses too much memory? I want to evaluate a list of machine learning pipelines on large datasets in parallel. I am doing this in a loop where I generate mod...
https://stackoverflow.com/questions/75844824/is-it-possible-to-have-dask-return-a-default-value-if-a-delayed-object-uses-too
python, machine-learning, scikit-learn, data-science, dask
1,679,782,405
se_55208008
stackoverflow
DATA_SCIENCE
ValueError: could not convert string to float. During Imputing missing data
ValueError: could not convert string to float. During Imputing missing data I am working on Melbourne housing dataset and during the pre processing I'm trying to impute missing data using the Mean / median strategy. I tried using Imputer from Sklearn.preprocessing. imp = Imputer( strategy='mean' ) dataset = imp.fit...
https://stackoverflow.com/questions/55208008/valueerror-could-not-convert-string-to-float-during-imputing-missing-data
python, pandas, machine-learning, scikit-learn, data-science
1,552,832,126
se_75845611
stackoverflow
DATA_SCIENCE
How to fix ValueError in Mixed Effect Linear Regression (Python)?
How to fix ValueError in Mixed Effect Linear Regression (Python)? I have to analyze my dataframe on python. I have uploaded an image of what my table looked like. I need to fit the "stage"(dependent variable), "overallscore"(independent variable), "spatialreasoning"(independent variable) & "numericalmemory"(independen...
https://stackoverflow.com/questions/75845611/how-to-fix-valueerror-in-mixed-effect-linear-regression-python
python, pandas, dataframe, regression, data-science
1,679,798,670
se_70937066
stackoverflow
DATA_SCIENCE
Make dropdown selection responsive for y axis Altair python
Make dropdown selection responsive for y axis Altair python I have several columns (eg, Column, y1, y2, y3..) that I need to relate to column "X" on a scatter plot in Altair. I have included a dropdown combo box to make the selection between the "y" columns however the plots fail to change according to the selection. ...
https://stackoverflow.com/questions/70937066/make-dropdown-selection-responsive-for-y-axis-altair-python
python, data-science, data-visualization, altair
1,643,701,710
se_75843859
stackoverflow
DATA_SCIENCE
Create new column that counts each string match
Create new column that counts each string match I aim to create a new column based on multiple string matches. This new column will return a 1 number for every match on the event column. Date Event 0 2022-11-01 Breakfast 1 2022-11-01 Breakfast 2 2022-11-01 Lunch 3 2022-11-02 ...
https://stackoverflow.com/questions/75843859/create-new-column-that-counts-each-string-match
python, pandas, dataframe, data-science, multiple-columns
1,679,770,287
se_75814532
stackoverflow
DATA_SCIENCE
Python: Why is FFT giving different results for the same data?
Python: Why is FFT giving different results for the same data? I have a datafile named 'yclip.txt' which is just a 1-column data. The program finds the the gradient of the autocorrelation function (here, dacf) of this data using the function ps.acf_dacf(). It then computes the FFT of dacf which gives the ADP. import p...
https://stackoverflow.com/questions/75814532/python-why-is-fft-giving-different-results-for-the-same-data
python, data-science, fft, autocorrelation
1,679,500,342
se_75842157
stackoverflow
DATA_SCIENCE
Results summary reporting z instead of t value for multiple OLS regression using statsmodelforumla?
Results summary reporting z instead of t value for multiple OLS regression using statsmodelforumla? I want to do report the results summary with t value but it keeps coming back with the z value in the summary even though I tried to correct it with the "use_T=True". model=smf.ols("gr_gdp_pc ~ ln_gdp + gr_cap_pc + gr_r...
https://stackoverflow.com/questions/75842157/results-summary-reporting-z-instead-of-t-value-for-multiple-ols-regression-using
pandas, statistics, data-science, linear-regression, statsmodels
1,679,752,376
se_69573475
stackoverflow
DATA_SCIENCE
Removing outliers from a dataset
Removing outliers from a dataset I was working on detecting anomalies and removing them. To understand topic better I started to work on a dataset. I used boxplots to see anomalies better and these are the graphs I have. Also these are values from clean-up code. I wrote the code below in order to print anomaly poin...
https://stackoverflow.com/questions/69573475/removing-outliers-from-a-dataset
python, data-science, visualization, anomaly-detection
1,634,225,497
se_75841685
stackoverflow
DATA_SCIENCE
Storing files from subfolders paired with their subfolder name
Storing files from subfolders paired with their subfolder name I have a folder in the following manner : Folder -> Multiple Subfolders -> variable number of multiple .txt files in those subfolders. I want to store those .txt files ( not the names of the files but the files itself) in such way that those .txt files are...
https://stackoverflow.com/questions/75841685/storing-files-from-subfolders-paired-with-their-subfolder-name
python, pandas, dataframe, data-science
1,679,747,301
se_75274364
stackoverflow
DATA_SCIENCE
Pandas: combining information from rows with consecutive duplicate values in a column
Pandas: combining information from rows with consecutive duplicate values in a column The title might be a bit confusing here, but in essence: We have a dataframe, let’s say like this: SKUCODE PROCCODE RUNCODE RSNCODE BEGTIME ENDTIME RSNNAME 0 218032 A 21183528 1010 2020-11-19 04:00 2020-11-19 04:15 Bank holi...
https://stackoverflow.com/questions/75274364/pandas-combining-information-from-rows-with-consecutive-duplicate-values-in-a-c
python, pandas, data-science, data-analysis
1,674,990,246
se_56862599
stackoverflow
DATA_SCIENCE
how to assign column name in a dataframe . If that column already has values
how to assign column name in a dataframe . If that column already has values I am calculating the value counts of usa state in a data frame . I have obtained a data frame . I have assigned a column name to the value counts i.e 'Class_0' , but how to assign column name i.e state_usa to the 1st column of data frame i.e ...
https://stackoverflow.com/questions/56862599/how-to-assign-column-name-in-a-dataframe-if-that-column-already-has-values
python, pandas, dataframe, data-science
1,562,125,148
se_75813124
stackoverflow
DATA_SCIENCE
converting objects to numbers in my dataset
converting objects to numbers in my dataset I have a dataset containing objects and I wanna convert it to numbers so I can build the model I tried to transform it but I have an error, I'm kinda confused, anyone can help?
https://stackoverflow.com/questions/75813124/converting-objects-to-numbers-in-my-dataset
machine-learning, scikit-learn, data-science, one-hot-encoding
1,679,492,965
se_75788985
stackoverflow
DATA_SCIENCE
Compute weighted cumulative sum for all pair of start point / end point in numpy
Compute weighted cumulative sum for all pair of start point / end point in numpy I have a numpy array signal and I try to compute the following value: C = (signal[t_begin:t_end + 1] * (np.arange(t_end - t_begin + 1) + 1)).sum() For all pairs t_begin, t_end such that 0 <= t_begin <= t_end < len(signal) without using a...
https://stackoverflow.com/questions/75788985/compute-weighted-cumulative-sum-for-all-pair-of-start-point-end-point-in-numpy
python, numpy, time-series, data-science
1,679,307,116
se_75817758
stackoverflow
DATA_SCIENCE
when i try to parse the code into csv file it gives me this:
when i try to parse the code into csv file it gives me this: UnicodeEncodeError: 'charmap' codec can't encode characters in position 0-2: character maps to <undefined> with open('F:\Temp\python\matches-details.csv', 'w') as output_file: dict_writer = csv.DictWriter(output_file, keys) dict_writer.write...
https://stackoverflow.com/questions/75817758/when-i-try-to-parse-the-code-into-csv-file-it-gives-me-this
python, python-3.x, web-scraping, data-science
1,679,523,643
se_56529724
stackoverflow
DATA_SCIENCE
How to decode geohash using python in pandas?
How to decode geohash using python in pandas? I need code to decode geohash in python. There's a column which contains geohashes. I need them decoded into latitude and longitude.
https://stackoverflow.com/questions/56529724/how-to-decode-geohash-using-python-in-pandas
python, pandas, geolocation, data-science, geocode
1,560,182,269
se_75816725
stackoverflow
DATA_SCIENCE
NMF reconstruction on test data
NMF reconstruction on test data I am trying to train NMF with a training set and apply it to a test set. But I encounter the incompatible shape problem in the second step. I wrote a python code to do NMF: def cost(X, W, H): """ Compute the Euclidean distance-based objective function for NMF. """ diff =...
https://stackoverflow.com/questions/75816725/nmf-reconstruction-on-test-data
python, algorithm, data-science, linear-algebra, projection
1,679,514,817
se_75815113
stackoverflow
DATA_SCIENCE
R barplot not displaying values correctly
R barplot not displaying values correctly Im trying to get a simple plot of a data set with countries and their total amount of covid cases, however my plot is not giving the largest numerical value of cases the largest bar. Data = read.csv("covid_worldwide.csv") Data = Data[c("Country", "Total.Cases", "Total.Deaths",...
https://stackoverflow.com/questions/75815113/r-barplot-not-displaying-values-correctly
r, ggplot2, data-science
1,679,503,869
se_75773259
stackoverflow
DATA_SCIENCE
How to convert date and time inside data frame to float64 datatype?
How to convert date and time inside data frame to float64 datatype? I have this Excel file data as in the image below ] following this tutorial with data mentioned (https://i.sstatic.net/kbI7C.png) I use colab notebook : by writing code down import numpy as np import pandas as pd import matplotlib.pyplot as plt from n...
https://stackoverflow.com/questions/75773259/how-to-convert-date-and-time-inside-data-frame-to-float64-datatype
python, pandas, dataframe, data-science
1,679,100,661
se_75796215
stackoverflow
DATA_SCIENCE
Train and test data setup for sklearn
Train and test data setup for sklearn I'm creating a classification model to predict the outcome of sports event(win/loss) and am running into a data setup conundrum. Currently the data is setup as follows: example_data = [team_a_feat_1, team_a_feat_2...team_b_feat_1, team_b_feat_2... OUTCOME_A_B] But am wondering if...
https://stackoverflow.com/questions/75796215/train-and-test-data-setup-for-sklearn
scikit-learn, data-science, sklearn-pandas, scikit-optimize, auto-sklearn
1,679,355,405
se_75780509
stackoverflow
DATA_SCIENCE
Loading data from Windows path
Loading data from Windows path I have downloaded the Lock5Data from https://cran.r-project.org/web/packages/Lock5Data/index.html for windows r-release: Lock5Data_3.0.0.zip and tried to load a dataset from there in a python script (with ChatGPT's help) as below: import pyreadr StudentSurvey = pyreadr.read_r('Lock5Data...
https://stackoverflow.com/questions/75780509/loading-data-from-windows-path
python, data-science, python-dataset
1,679,209,266
se_75789578
stackoverflow
DATA_SCIENCE
How to plot Time Series graph in Python for both odd &amp; even years?
How to plot Time Series graph in Python for both odd &amp; even years? I plotted a time series graph in Python but it is displaying only even years in graph. I want both even & odd years to be displayed. Can anyone suggest. Thanks in advance. Below is my code. plt.figure(figsize=(15,5)) plt.plot(data['Year'],data['Sal...
https://stackoverflow.com/questions/75789578/how-to-plot-time-series-graph-in-python-for-both-odd-even-years
python, time-series, data-science
1,679,310,719
se_75784269
stackoverflow
DATA_SCIENCE
In R: Why can&#39;t I color the dots on this plot?
In R: Why can&#39;t I color the dots on this plot? In R, I use a self-generated data frame of parties with their seats in an election. The problem is that the parliament plot is generated correctly, but the points that form the plot are shown in black and I cannot display them with the color that corresponds to the da...
https://stackoverflow.com/questions/75784269/in-r-why-cant-i-color-the-dots-on-this-plot
r, dataframe, ggplot2, dplyr, data-science
1,679,251,952
se_50711771
stackoverflow
DATA_SCIENCE
multiple seasonality Time series analysis in Python
multiple seasonality Time series analysis in Python I have a daily time series dataset that I am using Python SARIMAX method to predict for future. But I do not know how to write codes in python that accounts for multiple seasonalities. As far as I know, SARIMAX takes care of only one seasonality but I want to check f...
https://stackoverflow.com/questions/50711771/multiple-seasonality-time-series-analysis-in-python
python, time-series, data-science, dummy-variable, arima
1,528,255,078
se_75761003
stackoverflow
DATA_SCIENCE
Detecting anomalous sinusoidal pattern in a timeseries dataframe
Detecting anomalous sinusoidal pattern in a timeseries dataframe fig1. image of what the dataframe looks like fig2. image of a company ticker with an anomolous sinusoidal data pattern My problem is that I'd like to find other company tickers within the dataframe I have present, fig1. where I can detect a sinusoidal wa...
https://stackoverflow.com/questions/75761003/detecting-anomalous-sinusoidal-pattern-in-a-timeseries-dataframe
python, machine-learning, time-series, data-science, artificial-intelligence
1,678,995,930
se_74921884
stackoverflow
DATA_SCIENCE
Python Altair transform_regression with binned data
Python Altair transform_regression with binned data My problem is that I'm trying to visualize some data of the cars.csv containing the variables for age and mileage (kilometers). I want to visualize the relationship between both variables with regression lines. When I'm adding the bin parameter to set the classes for...
https://stackoverflow.com/questions/74921884/python-altair-transform-regression-with-binned-data
python, data-science, visualization, altair
1,672,069,710
se_75762216
stackoverflow
DATA_SCIENCE
How to count people who are below a position
How to count people who are below a position I'm looking to count how many people are below a given user of the data frame. Employee Manager A - B A C A D A E A F B G B H C I C I would like to get in the output: I, H, G, F, E and D have no employees below C has two employees (H and I) below...
https://stackoverflow.com/questions/75762216/how-to-count-people-who-are-below-a-position
python, pandas, dataframe, automation, data-science
1,679,006,034
se_75758391
stackoverflow
DATA_SCIENCE
error in python to identify correct folder path in windows server
error in python to identify correct folder path in windows server enter image description hereI'm trying to save a file on DISK E of the Windows server and save it in another folder in the same location using Python. But I'm always getting this error:enter image description here OSError: [WinError 123] The syntax for ...
https://stackoverflow.com/questions/75758391/error-in-python-to-identify-correct-folder-path-in-windows-server
python, windows, data-science, computer-science
1,678,981,007
se_75757621
stackoverflow
DATA_SCIENCE
Improving the runtime of cosine similarity on a large dataset of phrases
Improving the runtime of cosine similarity on a large dataset of phrases I am using cosine similarity to group similar phrases together, in order to reduce the number of phrase entries I am storing in my DB. The grouping process depends on generating pairings of similar phrases. I am following Python implementation of...
https://stackoverflow.com/questions/75757621/improving-the-runtime-of-cosine-similarity-on-a-large-dataset-of-phrases
python, numpy, pyspark, data-science, cosine-similarity
1,678,976,760
se_64857282
stackoverflow
DATA_SCIENCE
Countplot function does not work on binned data
Countplot function does not work on binned data So I have been trying to distribute the data into bins and then use the countplot function on it. But it gives me an error. The binning part of the code seems to be working fine, the problem might be with the countplot function. It would be great if you could suggest how...
https://stackoverflow.com/questions/64857282/countplot-function-does-not-work-on-binned-data
python, pandas, seaborn, data-science
1,605,526,691
se_68875496
stackoverflow
DATA_SCIENCE
HUGGINGFACE TypeError: &#39;&gt;&#39; not supported between instances of &#39;NoneType&#39; and &#39;int&#39;
HUGGINGFACE TypeError: &#39;&gt;&#39; not supported between instances of &#39;NoneType&#39; and &#39;int&#39; I am working on Fine-Tuning Pretrained Model on custom (using HuggingFace) dataset I will copy all code correctly from the one youtube video everything is ok but in this cell/code: with training_args.strategy....
https://stackoverflow.com/questions/68875496/huggingface-typeerror-not-supported-between-instances-of-nonetype-and-in
deep-learning, data-science, huggingface-transformers, huggingface-tokenizers, huggingface-datasets
1,629,568,453
se_75748698
stackoverflow
DATA_SCIENCE
How to pivot a table using specific columns in pandas
How to pivot a table using specific columns in pandas My DataFrame looks something like this df=pd.DataFrame("Country":["India","China","USA","UK"] 2001:[11,12,13,14] 2002:[21,22,23,24] 2003:[31,32,33,34] 2004:[41,42,43,44] How can I ...
https://stackoverflow.com/questions/75748698/how-to-pivot-a-table-using-specific-columns-in-pandas
pandas, dataframe, pivot, data-science, pivot-table
1,678,904,600
se_75747828
stackoverflow
DATA_SCIENCE
Oracle SQL banding values by stdev at a certain time
Oracle SQL banding values by stdev at a certain time On Oracle 11 I have a time series of data where in I have something like: cluster METRIC_DATE METRIC_HOUR ERRORS ECWZ 2023-02-01 22 0 ECWZ 2023-02-01 23 0 ECWZ 2023-02-02 0 1 ECWZ 2023-02-02 1 0 ECWZ 2023-02-02 2 0 create table MY_TABLE ( "cl...
https://stackoverflow.com/questions/75747828/oracle-sql-banding-values-by-stdev-at-a-certain-time
oracle-database, data-science
1,678,899,319
se_75733938
stackoverflow
DATA_SCIENCE
Merge on range between two columns
Merge on range between two columns I have a table of records with a position "stand" and a column timestamp or "datetime". I need to append this table with information on "acreg" and "flight". The table with records (df_hvd) has the following columns of interest: datetime stand reason 022-08-08 02:55:15 D02 Te...
https://stackoverflow.com/questions/75733938/merge-on-range-between-two-columns
python, datetime, merge, data-science
1,678,801,266
se_75729567
stackoverflow
DATA_SCIENCE
Not reading / opening of root file from uproot
Not reading / opening of root file from uproot I am trying to read a file.root using ** uproot** but it's throwing back this error :- File "/Users/siddharthkeshar/opt/anaconda3/lib/python3.9/site-packages/uproot/source/chunk.py", line 370, in wait raise OSError( OSError: expected Chunk of length 395, received 0 bytes ...
https://stackoverflow.com/questions/75729567/not-reading-opening-of-root-file-from-uproot
python-3.x, data-science, uproot
1,678,773,803
se_75700349
stackoverflow
DATA_SCIENCE
How to apply Fisher&#39;s exact test to each column of count data split into two categories?
How to apply Fisher&#39;s exact test to each column of count data split into two categories? I have count data (columns) in the form of presence/absence (1/0) of various genes in different samples that belong to one of two categories. I am trying to do a Fisher's (fisher.test) for each gene and output the data into a ...
https://stackoverflow.com/questions/75700349/how-to-apply-fishers-exact-test-to-each-column-of-count-data-split-into-two-cat
r, loops, statistics, data-science, data-analysis
1,678,477,056
se_75735953
stackoverflow
DATA_SCIENCE
How to remove columns that contain all the same value
How to remove columns that contain all the same value I have count data (columns) in the form of presence/absence (1/0) of various genes in different samples that belong to one of two categories. I am doing a Fisher's (fisher.test) for each gene, but I get an error whenever that gene is present (1) or absent (0) from ...
https://stackoverflow.com/questions/75735953/how-to-remove-columns-that-contain-all-the-same-value
r, loops, statistics, data-science, data-analysis
1,678,811,555
se_75732181
stackoverflow
DATA_SCIENCE
how to create a table from a set of arrays with dictionaries
how to create a table from a set of arrays with dictionaries in the data, column df['comments'] consists of 88107 rows with arrays with dictionaries ` [{'text': "It will be curious to see where this heads in the long run. CBS is on a tear but will it fit their image, will they try and establish control, overall agend...
https://stackoverflow.com/questions/75732181/how-to-create-a-table-from-a-set-of-arrays-with-dictionaries
python, arrays, json, pandas, data-science
1,678,791,025
se_75589711
stackoverflow
DATA_SCIENCE
Unable to apply color gradient - Index Error
Unable to apply color gradient - Index Error I was practicing crosstabulation of two fields and format it using color gradient. But I am getting an error called Index error while using the color gradient . Any kind of help would be appreciated :) I have already created a cross tab , and I am trying to apply color grad...
https://stackoverflow.com/questions/75589711/unable-to-apply-color-gradient-index-error
python, data-science, color-gradient
1,677,574,121
se_75725932
stackoverflow
DATA_SCIENCE
same code different steps two different outcomes
same code different steps two different outcomes question : so despite these two being the same when I execute both code I get two different graphs. someone please explain why. code1 output code2 I don't understand why the output is different considering they are both operating on the same data. The only difference is...
https://stackoverflow.com/questions/75725932/same-code-different-steps-two-different-outcomes
python-3.x, data-science, data-analysis
1,678,734,104
se_75719186
stackoverflow
DATA_SCIENCE
Cross_val_score returns huge numbers
Cross_val_score returns huge numbers Ln = LinearRegression() Ln.fit(X_train, y_train) print(np.mean(cross_val_score(Ln, X_train, y_train, scoring= "neg_mean_absolute_error", cv= 2))) The results I get back are huge numbers, I have found below link that might explain my issue, but doesnt offer solutions sklearn-metr...
https://stackoverflow.com/questions/75719186/cross-val-score-returns-huge-numbers
python, scikit-learn, data-science
1,678,693,832
se_75713989
stackoverflow
DATA_SCIENCE
Counting circular and square stars in numpy array
Counting circular and square stars in numpy array SOLVED (by @AaronKeesing) If the goal is to predict numeric values, linear regression should be applied. But instead I went with logistic regression for binary classification. The exercise is stated as follows: Given the data 'stars_train_X_y.npz'. I need to found out...
https://stackoverflow.com/questions/75713989/counting-circular-and-square-stars-in-numpy-array
python, numpy, scikit-learn, data-science, logistic-regression
1,678,632,777
se_75725058
stackoverflow
DATA_SCIENCE
Pull ~4000 images from subreddit with PRAW
Pull ~4000 images from subreddit with PRAW I have a data science project where I'm trying to pull images from reddit with the associated upvotes on their post. I want to get around 3,000-4,000 samples. PRAW only supports pulling 1,000 submissions at a time, and I'm struggling to find a way to start at the 1,000 new po...
https://stackoverflow.com/questions/75725058/pull-4000-images-from-subreddit-with-praw
python, web-scraping, data-science, reddit, praw
1,678,728,383
se_75718549
stackoverflow
DATA_SCIENCE
why do data sometimes split into 4 stets and sometimes into 2 (any difference)?
why do data sometimes split into 4 stets and sometimes into 2 (any difference)? As the question explains, working with some examples I see sometimes that when splitting the datasets its either like xtrain,xtest,ytrain,ytest=train_test_split() or train,test= train_test_split() but none of these examples explains w...
https://stackoverflow.com/questions/75718549/why-do-data-sometimes-split-into-4-stets-and-sometimes-into-2-any-difference
split, nlp, data-science
1,678,688,146