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_75697549
stackoverflow
DATA_SCIENCE
How do I plot sentiment polarity chart using sentiment score?
How do I plot sentiment polarity chart using sentiment score? I have been able to do the sentiment analysis with the sentiment score. But i am having problem plotting it as a chart. Here is code on the sentiment score, but i also want to include a chart. def senti_sc(x): if x is not None: return TextBlob(x)...
https://stackoverflow.com/questions/75697549/how-do-i-plot-sentiment-polarity-chart-using-sentiment-score
python-3.x, dataframe, machine-learning, data-science, sentiment-analysis
1,678,459,522
se_75698636
stackoverflow
DATA_SCIENCE
Library to cluster circular data
Library to cluster circular data I have an array of data that describes the number of people at a restaurant which is also a nightclub. The data distribution is as follows: I assume customer distributions to be approximately gaussian, so if it were weighted 1D data that wasn't directional I would be able to find clus...
https://stackoverflow.com/questions/75698636/library-to-cluster-circular-data
data-science, cluster-analysis, k-means, gaussian, circular-dependency
1,678,465,646
se_75719696
stackoverflow
DATA_SCIENCE
What object is a sklearn.pipeline.Pipeline that applies a ColumnTransformer actually fitting on when fit(X, Y) is called on it
What object is a sklearn.pipeline.Pipeline that applies a ColumnTransformer actually fitting on when fit(X, Y) is called on it I am trying to get an idea of the inner workings of a scikit learn Pipeline. Consider the below data set and pipeline construction. data = pd.DataFrame({ 'Name': ['Alice', 'Bob', 'Charlie'...
https://stackoverflow.com/questions/75719696/what-object-is-a-sklearn-pipeline-pipeline-that-applies-a-columntransformer-actu
python, scikit-learn, data-science, pipeline
1,678,697,654
se_65049905
stackoverflow
DATA_SCIENCE
runfile('C:/Users/Admin/.spyder-py3/temp.py', wdir='C:/Users/Admin/.spyder-py3')
runfile('C:/Users/Admin/.spyder-py3/temp.py', wdir='C:/Users/Admin/.spyder-py3') I try to run a script, but I am facing this type of error. How can I fix that error? I can't find the reason. runfile('C:/Users/Admin/.spyder-py3/temp.py', wdir='C:/Users/Admin/.spyder-py3') Reloaded modules: jupyter_clien...
https://stackoverflow.com/questions/65049905/runfilec-users-admin-spyder-py3-temp-py-wdir-c-users-admin-spyder-py3
python, data-science, spyder, python-decorators
1,606,569,027
se_75714459
stackoverflow
DATA_SCIENCE
Data manipulation with pandas: averaging first and last, second and second last and so on
Data manipulation with pandas: averaging first and last, second and second last and so on hello I have cleaned some data so it looks like this A B 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 0 1 0 12 9 11 8 10 7 9 6 8 5 7 4 6 3 5 2 4 1 3 1 2 3 1 5 0 7 I want to have ...
https://stackoverflow.com/questions/75714459/data-manipulation-with-pandas-averaging-first-and-last-second-and-second-last
python, pandas, dataframe, data-science
1,678,637,302
se_75715042
stackoverflow
DATA_SCIENCE
Can I count unique values of a column and add counts as seperate columns for each unique value, preferably seperately for each subject?
Can I count unique values of a column and add counts as seperate columns for each unique value, preferably seperately for each subject? For example, I have my data in the following form: Group Product 0 1 A 1 1 A 2 1 B 3 2 A 4 2 B 5 2 C 6 3 ...
https://stackoverflow.com/questions/75715042/can-i-count-unique-values-of-a-column-and-add-counts-as-seperate-columns-for-eac
python, pandas, data-science, data-analysis, data-preprocessing
1,678,642,327
se_75664844
stackoverflow
DATA_SCIENCE
LSTM Input Reshape
LSTM Input Reshape I am a deep learning beginner and working on LSTM for a multi-classification problem, my dataset has features=10, timestepts=1, and the target classes are 5 classes (0,1,2,3,4). I am not sure if I did the input reshape correctly because I got an error when I wanted to calculate the model latency + t...
https://stackoverflow.com/questions/75664844/lstm-input-reshape
python, deep-learning, data-science, lstm, recurrent-neural-network
1,678,207,421
se_75710007
stackoverflow
DATA_SCIENCE
forward() got an unexpected keyword argument 'labels'
forward() got an unexpected keyword argument 'labels' I am trying to use fine-tune TransformerXL for language modeling. from transformers import TransfoXLTokenizer, TransfoXLModel tokenizer = TransfoXLTokenizer.from_pretrained("transfo-xl-wt103") model = TransfoXLModel.from_pretrained("transfo-xl-wt103") I h...
https://stackoverflow.com/questions/75710007/forward-got-an-unexpected-keyword-argument-labels
nlp, data-science, huggingface-transformers, language-model
1,678,574,248
se_75690904
stackoverflow
DATA_SCIENCE
Topic modeling with word embeddings
Topic modeling with word embeddings I am currently trying to create an LDA model with word embeddings. Here is the code: from gensim.models.ldamodel import LdaModel from gensim.corpora.dictionary import Dictionary from gensim.test.utils import common_texts from gensim.models.word2vec import Word2Vec # Convert the tex...
https://stackoverflow.com/questions/75690904/topic-modeling-with-word-embeddings
data-science, gensim, lda, word-embedding, topic-modeling
1,678,403,660
se_75689153
stackoverflow
DATA_SCIENCE
Taking specific data from .txt and sorting it into an excel or csv file through Python
Taking specific data from .txt and sorting it into an excel or csv file through Python I am trying to write a program that will look through one folder which has 2 subfolders of .txt files and extract one line of data from each .txt file into an excel/CSV file with specific arrangements for the axis: So for example, i...
https://stackoverflow.com/questions/75689153/taking-specific-data-from-txt-and-sorting-it-into-an-excel-or-csv-file-through
python, data-science, export-to-excel
1,678,389,717
se_75688480
stackoverflow
DATA_SCIENCE
Create group having Percentage diff <=30%
Create group having Percentage diff <=30% I am calculating % difference among all values and then creating group . As an output I am getting combinations of 2 values but I want combine all values in one group which are less than 30% of each other. Working code is given below from itertools import combinations d...
https://stackoverflow.com/questions/75688480/create-group-having-percentage-diff-30
python, python-3.x, data-science
1,678,385,245
se_75694201
stackoverflow
DATA_SCIENCE
ERROR: Could not find a version that satisfies the requirement matplotlib (from versions: none) No matching distribution found for matplotlib
ERROR: Could not find a version that satisfies the requirement matplotlib (from versions: none) No matching distribution found for matplotlib I am using python Python 3.11.2 and installed and upgraded pip, pandas, numpy. Now I am trying to install matplotlib and seaborn. It's not able to reach URL due to timeout and u...
https://stackoverflow.com/questions/75694201/error-could-not-find-a-version-that-satisfies-the-requirement-matplotlib-from
python, matplotlib, seaborn, data-science
1,678,439,780
se_73708204
stackoverflow
DATA_SCIENCE
How do I download a folder from AWS S3 with CloudPathLib from a public bucket?
How do I download a folder from AWS S3 with CloudPathLib from a public bucket? I'm trying to download a folder from a public AWS S3 bucket using the Python library cloudpathlib. My code looks like this: from cloudpathlib import CloudPath path = r"C:\some\path\to\folder" url = "s3://some-example-bucket/folder/" cloud_...
https://stackoverflow.com/questions/73708204/how-do-i-download-a-folder-from-aws-s3-with-cloudpathlib-from-a-public-bucket
python, amazon-s3, data-science, boto3, pathlib
1,663,096,349
se_75686180
stackoverflow
DATA_SCIENCE
How to get rid of ValueError: could not convert string to float 'Enrolled' in Google Colab?
How to get rid of ValueError: could not convert string to float 'Enrolled' in Google Colab? I keep on getting ValueError: could not convert string to float: 'Enrolled' I was given a dataset and was asked to perform 5 machine algorithms. As per my previous question, only 2 of them successfully worked. (Thank yo...
https://stackoverflow.com/questions/75686180/how-to-get-rid-of-valueerror-could-not-convert-string-to-float-enrolled-in-go
python, data-science, google-colaboratory
1,678,373,243
se_75685095
stackoverflow
DATA_SCIENCE
How to Remove IndentationError: expected an indented block: except ValueError: in Google Colab
How to Remove IndentationError: expected an indented block: except ValueError: in Google Colab Given a dataset I was asked to perform 5 machine learning models on the dataset. Here is my code: standard_scaler = StandardScaler() try: X_train=standard_scaler.fit_transform(X_train) X_test=standard_scaler.fit_transfor...
https://stackoverflow.com/questions/75685095/how-to-remove-indentationerror-expected-an-indented-block-except-valueerror-i
python, data-science, google-colaboratory
1,678,367,544
se_75674753
stackoverflow
DATA_SCIENCE
Segmenting customers by email opening days preference?
Segmenting customers by email opening days preference? I have a dataset like this that shows for thousands of our customers, their email opens data by day of week. We are trying to segment our customers by certain preferences / patterns that we can find in this data. I am not sure how to approach this mathematically, ...
https://stackoverflow.com/questions/75674753/segmenting-customers-by-email-opening-days-preference
sql, pandas, statistics, data-science, analytics
1,678,287,900
se_61378833
stackoverflow
DATA_SCIENCE
juHow to find % of missing values which are greater than 1 or 0 in python
juHow to find % of missing values which are greater than 1 or 0 in python I am finding the percentage of missing values in my dataset with more than 0 or 1 as I want to impute it later. I am using this code df which has the data df.isnull().mean()*100 output of the above code loan_amount 0.000000 funded_...
https://stackoverflow.com/questions/61378833/juhow-to-find-of-missing-values-which-are-greater-than-1-or-0-in-python
python, jupyter-notebook, data-science
1,587,612,327
se_75660565
stackoverflow
DATA_SCIENCE
How to download and use excel with (CC BY4) authentication inside Python
How to download and use excel with (CC BY4) authentication inside Python I need to download and use an excel file directly inside the jupyter notebook from the new Global Carbon Budget I tried many codes but without a hope. The only way was to get the file manually which is not an option for scientific and transparen...
https://stackoverflow.com/questions/75660565/how-to-download-and-use-excel-with-cc-by4-authentication-inside-python
python, data-science
1,678,183,835
se_75673103
stackoverflow
DATA_SCIENCE
Ffill and BFill in pandas using conditions
Ffill and BFill in pandas using conditions I am trying to solve a question where we need to use ffill and bfill along with conditions. DataFrame : A 100 B NULL C NULL D 100 E NULL F 103 Output DataFrame : A 100 B 100 C 100 D 100 E NULL F 103 Rows B and C are populated with 100 because value of A = value of D = 100. ...
https://stackoverflow.com/questions/75673103/ffill-and-bfill-in-pandas-using-conditions
python, pandas, dataframe, data-science
1,678,278,952
se_75667493
stackoverflow
DATA_SCIENCE
How to web scraping graph data?
How to web scraping graph data? I'm currently working on a personal small machine learning project to predict action figure prices, the first thing I need is data obviously. I want to collect the price history data from here: https://www.actionfigure411.com/transformers/war-for-cybertron-siege-series/deluxe-class/iron...
https://stackoverflow.com/questions/75667493/how-to-web-scraping-graph-data
python, dataframe, machine-learning, web-scraping, data-science
1,678,225,712
se_71962201
stackoverflow
DATA_SCIENCE
Error 'names' attribute [35563] must be the same length as the vector [1] after running SMOGNRegress in R
Error 'names' attribute [35563] must be the same length as the vector [1] after running SMOGNRegress in R I'm trying to oversample an imbalanced dataset with a continuous target variable using SMOGNRegress from the UBL package in R. When I run the code: SMOGNRegress(Deceased~., normalized_data, rel = "auto", t...
https://stackoverflow.com/questions/71962201/error-names-attribute-35563-must-be-the-same-length-as-the-vector-1-after
r, data-science, oversampling
1,650,587,420
se_75661662
stackoverflow
DATA_SCIENCE
Irish Residential Property Price Register Data Plot Problem
Irish Residential Property Price Register Data Plot Problem I have a very large dataset, which is over 500k observation, it contains counties of ireland and their residential property price register. I have been working on this data with sampling method to avoid overfitting it caused me very slow results with Jupyter ...
https://stackoverflow.com/questions/75661662/irish-residential-property-price-register-data-plot-problem
jupyter-notebook, plotly, data-science, visualization, data-analysis
1,678,190,067
se_75654998
stackoverflow
DATA_SCIENCE
Reorder factor levels in table1 in R
Reorder factor levels in table1 in R I am putting together a descriptive statistics table in R using the table1 project and noticed that regardless of how I order factor variables, the table1 function defaults to sorting these factor levels in alphabetical order. For example it sorts income categories in the order of ...
https://stackoverflow.com/questions/75654998/reorder-factor-levels-in-table1-in-r
r, data-science
1,678,130,684
se_74891311
stackoverflow
DATA_SCIENCE
jupyter Notebook cannot read head of csv file correctly
jupyter Notebook cannot read head of csv file correctly i just start learning Data Analytics, and trying to understand step by step cleaning the data, I have a example data from freeCodeCamp https://github.com/ine-rmotr-curriculum/FreeCodeCamp-Pandas-Real-Life-Example what I confused is in the "data/sales_data.csv" I ...
https://stackoverflow.com/questions/74891311/jupyter-notebook-cannot-read-head-of-csv-file-correctly
python-3.x, jupyter-notebook, data-science
1,671,726,616
se_75654810
stackoverflow
DATA_SCIENCE
How to fill gaps in a time series that is formatted in columns, using Python
How to fill gaps in a time series that is formatted in columns, using Python I have time series data with each year's data stored in different columns. This data is known to have some data errors which are causing minor holes in the time series data that I'd like to correct. For reference, the data looks like this df ...
https://stackoverflow.com/questions/75654810/how-to-fill-gaps-in-a-time-series-that-is-formatted-in-columns-using-python
python, time, time-series, data-science
1,678,129,320
se_75079929
stackoverflow
DATA_SCIENCE
Storing encoded Features in the Feature Store?
Storing encoded Features in the Feature Store? I am currently in the design phase of a feature store pipeline to train and serve ML models. One thing which confuses me is the "state" in which features are supposed to be stored in the feature store. Let's assume I have a data source which has an entries of the followin...
https://stackoverflow.com/questions/75079929/storing-encoded-features-in-the-feature-store
machine-learning, data-science, mlops
1,673,424,379
se_75623410
stackoverflow
DATA_SCIENCE
Finding Pickel File in local files
Finding Pickel File in local files import pickle filename='pred_model1' pickle.dump(b_dtc, open(filename,'wb')) #here b_dtc is my modelname` when I executed the code it works well but how to know where the pickle file is downloaded in my system, as it is not present in my current working directory. note: i am using c...
https://stackoverflow.com/questions/75623410/finding-pickel-file-in-local-files
machine-learning, deep-learning, data-science, decision-tree
1,677,820,691
se_75640772
stackoverflow
DATA_SCIENCE
Monte Carlo Simulation in R for Simple Game with Assigned Distribution
Monte Carlo Simulation in R for Simple Game with Assigned Distribution I am trying to figure out how to create a Monte Carlo Simulation for a game in R. In the game you have two players, P1 and P2. During each round, one player gets to take an action. P1 takes the action 60% of the time. P2 takes the action 40% of the...
https://stackoverflow.com/questions/75640772/monte-carlo-simulation-in-r-for-simple-game-with-assigned-distribution
r, statistics, data-science, montecarlo
1,678,001,585
se_75638761
stackoverflow
DATA_SCIENCE
Joining 2 data frames with all the same columns
Joining 2 data frames with all the same columns In pandas/jupyter notebook with python: I have a dataframe (df1) with information about the amount of crime per year where each row is a summation of the total amount of crime in that country-year unit. However, df1 does not have rows which contain "0 crime" for the year...
https://stackoverflow.com/questions/75638761/joining-2-data-frames-with-all-the-same-columns
pandas, dataframe, join, merge, data-science
1,677,965,221
se_62231031
stackoverflow
DATA_SCIENCE
how to crawl semantically similar sentences
how to crawl semantically similar sentences I want to create a corpus for a machine learning task. I have a small textual dataset and want to crawl similar sentences from web. I used sentence_transformers package with Bert pertained model, doc2vec and spacy similarity to measure similarity. I set the threshold to 85%,...
https://stackoverflow.com/questions/62231031/how-to-crawl-semantically-similar-sentences
python, nlp, data-science, sentence-similarity, semantic-analysis
1,591,442,863
se_62686561
stackoverflow
DATA_SCIENCE
How to change the labels of an area chart on Streamlit?
How to change the labels of an area chart on Streamlit? I have deployed an area chart using Streamlit for Python. Is it possible to change the labels for the axis X, as well as the labels for each data point plotted? import streamlit as st import pandas as pd st.write(""" My area chart """) df = pd.read_csv("my_data.c...
https://stackoverflow.com/questions/62686561/how-to-change-the-labels-of-an-area-chart-on-streamlit
python, charts, data-science, streamlit
1,593,644,529
se_75633751
stackoverflow
DATA_SCIENCE
find the co-ordinate and highlight the required text in image in python
find the co-ordinate and highlight the required text in image in python I have the photo in which I wanted to get the co-ordinate of text and highlight the text. Text to highlight and get co-ordinate = 'was the age of wisdom' I try to get the co-ordinate by providing the first and last word but didn't get the require...
https://stackoverflow.com/questions/75633751/find-the-co-ordinate-and-highlight-the-required-text-in-image-in-python
python, image-processing, nlp, computer-vision, data-science
1,677,906,146
se_75625359
stackoverflow
DATA_SCIENCE
refactor age imputation
refactor age imputation How can I refactor the following code to make sure it easier to read and better using a function. Can reproduce code and data frames used using GitHub https://github.com/hamidpat/titanic posted csv used on my github. import numpy as np import pandas as pd train_df = pd.read_csv("train_df.csv"...
https://stackoverflow.com/questions/75625359/refactor-age-imputation
python, pandas, machine-learning, data-science
1,677,836,016
se_75597246
stackoverflow
DATA_SCIENCE
How to calculate average asset price path after a certain event?
How to calculate average asset price path after a certain event? I have a panda data frame that looks like this ticker Some index Asset price pct_change date 2016-01-01 -15.0 0.05799 NaN 2016-01-04 -14.0 0.05777 -0.003794 2016-01-05 -15.0 0.05768 -0.001558 2016-01-06 -19.0 0.05702 -0.011442 2016-01-0...
https://stackoverflow.com/questions/75597246/how-to-calculate-average-asset-price-path-after-a-certain-event
python, data-science, finance, quantitative-finance
1,677,618,037
se_75528485
stackoverflow
DATA_SCIENCE
Can anyone help me in fixing this error / warning FutureWarning: 'normalize' was deprecated in version 1.0 and will be removed in 1.2
Can anyone help me in fixing this error / warning FutureWarning: 'normalize' was deprecated in version 1.0 and will be removed in 1.2 [[enter image description here](https://i.sstatic.net/2ASd7.png)](https://i.sstatic.net/uaNXs.png) FutureWarning: 'normalize' was deprecated in version 1.0 and will be removed ...
https://stackoverflow.com/questions/75528485/can-anyone-help-me-in-fixing-this-error-warning-futurewarning-normalize-was
python, machine-learning, data-science
1,677,042,453
se_71875064
stackoverflow
DATA_SCIENCE
How to create a ggplot bar chart with multiple columns of data for y?
How to create a ggplot bar chart with multiple columns of data for y? My dataset looks like this : Here's a table with a sample of the data: City AverageClientUsage AverageClientEst EstimatedTraffic Atlanta 2695.68 3555.62 2812.89 Boston 559.48 1080.49 583.81 Chicago 3314.44 5728 3458.56 I'd like ggpl...
https://stackoverflow.com/questions/71875064/how-to-create-a-ggplot-bar-chart-with-multiple-columns-of-data-for-y
r, ggplot2, data-science
1,649,954,787
se_74101479
stackoverflow
DATA_SCIENCE
How do I use the predict function to return the probability of making 50k a year and add it as a categorical variable to my dataTestReduced dataframe?
How do I use the predict function to return the probability of making 50k a year and add it as a categorical variable to my dataTestReduced dataframe? Here is the beginning of my code library(car, quietly = TRUE) dataTrain <- read.csv("~/Downloads/AdultsTrainDataset.csv", na.strings = "?") dataTest <- read.csv("~/Dow...
https://stackoverflow.com/questions/74101479/how-do-i-use-the-predict-function-to-return-the-probability-of-making-50k-a-year
r, data-science, computer-science
1,666,030,540
se_75610877
stackoverflow
DATA_SCIENCE
The fitting curve does not match with experimental data. How can I match the curve fitting?
The fitting curve does not match with experimental data. How can I match the curve fitting? The red color indicates curve fitting and the magenta color indicates experimental data I try to change the initial guessing parameters, but it does not work. Below is my code x=file[0] # 1st column gives time y=file[1] # 2nd ...
https://stackoverflow.com/questions/75610877/the-fitting-curve-does-not-match-with-experimental-data-how-can-i-match-the-cur
python, matplotlib, machine-learning, scipy, data-science
1,677,725,088
se_75368749
stackoverflow
DATA_SCIENCE
Count the number of repetitive values separated by commas
Count the number of repetitive values separated by commas I have the set that looks something like : colA Nepal , India , USA USA India USA Nepal , India USA USA, Nepal Nepal Japan so I want the count as : COlB Count Nepal 4 India 3 USA 5 Japan 4 Is there a way to do it, w...
https://stackoverflow.com/questions/75368749/count-the-number-of-repetitive-values-separated-by-commas
count, data-science, tableau-api, tableau-desktop
1,675,741,234
se_75585102
stackoverflow
DATA_SCIENCE
FutureWarning: Automatic reindexing on DataFrame vs Series comparisons is deprecated and will raise ValueError in a future version&quot; using ai in bot
FutureWarning: Automatic reindexing on DataFrame vs Series comparisons is deprecated and will raise ValueError in a future version&quot; using ai in bot I'm making a bot for Telegram with recommendation system in it. There's a part of code: search_word = str(message.text) movie_search = movies[movies['title']....
https://stackoverflow.com/questions/75585102/futurewarning-automatic-reindexing-on-dataframe-vs-series-comparisons-is-deprec
python, pandas, data-science, artificial-intelligence, aiogram
1,677,528,542
se_54437243
stackoverflow
DATA_SCIENCE
How to compute Prediction Intervals for Machine Learning Regression Tasks in Python
How to compute Prediction Intervals for Machine Learning Regression Tasks in Python Iam quite new to the field of ML and DS and currently I am struggling since 2 days with the basic idea of illustrating the uncertainty of my prediction. I constructed an ensemble model based on several weak learners and an xgboost as m...
https://stackoverflow.com/questions/54437243/how-to-compute-prediction-intervals-for-machine-learning-regression-tasks-in-pyt
python, machine-learning, data-science
1,548,840,530
se_75584491
stackoverflow
DATA_SCIENCE
how to display only one table at a time when using buttons
how to display only one table at a time when using buttons I am working with R markdown and I have many different tables and I added a button for each table but for some reason when I first open the file all tables display until I click on a button. How can I fix this? I would like to see only one table whenever I fir...
https://stackoverflow.com/questions/75584491/how-to-display-only-one-table-at-a-time-when-using-buttons
javascript, html, r-markdown, data-science
1,677,524,083
se_75558192
stackoverflow
DATA_SCIENCE
How to turn off scientific notation for the pandas.plotting.scatter_matrix method
How to turn off scientific notation for the pandas.plotting.scatter_matrix method I am trying to create a scatter matrix of a dataframe using the pandas.plotting.scatter_matrix method. It mostly works, but the automatic scientific notation is ruining my graph. Here is the code and produced graph: plt.figure(figsize=(1...
https://stackoverflow.com/questions/75558192/how-to-turn-off-scientific-notation-for-the-pandas-plotting-scatter-matrix-metho
python, pandas, matplotlib, data-science, visualization
1,677,251,418
se_75559316
stackoverflow
DATA_SCIENCE
Using sliding windows to evaluate sentiment for text groupings
Using sliding windows to evaluate sentiment for text groupings I am trying to create a sliding window to evaluate sentiment on groupings of utterances within a conversation, with the goal of: Evaluating the sentiment of a single utterance in a conversational grouping Evaluating a grouping of sentiment based on the st...
https://stackoverflow.com/questions/75559316/using-sliding-windows-to-evaluate-sentiment-for-text-groupings
python, data-science, openai-api, gpt-3
1,677,257,669
se_75580595
stackoverflow
DATA_SCIENCE
how to run and monitor a python script in a azure virtual machine using python
how to run and monitor a python script in a azure virtual machine using python I am trying to start a Azure virtual machine and run a python script using a bat file inside the VM, monitor it and power off the VM if the batch process is terminated, using python I have figured out the way to shut down and start the VM, ...
https://stackoverflow.com/questions/75580595/how-to-run-and-monitor-a-python-script-in-a-azure-virtual-machine-using-python
python, azure, automation, data-science, virtual-machine
1,677,501,564
se_75507548
stackoverflow
DATA_SCIENCE
VS Code startup &lt;conda active base&gt; error message
VS Code startup &lt;conda active base&gt; error message I just getting started learning with Anaconda on Visual Studio Code. Previously, I only used the Python as an interpreter. After downloaded the Anaconda and upon opening the VS Code I always encounter the following error message. PS C:\Users\user\Documents\Python...
https://stackoverflow.com/questions/75507548/vs-code-startup-conda-active-base-error-message
python, anaconda, data-science
1,676,885,938
se_75546110
stackoverflow
DATA_SCIENCE
Error on Seaborn lmplot when passing dataframe data due to dtype(&#39;O&#39;) error, except I&#39;ve replaced all object dtypes
Error on Seaborn lmplot when passing dataframe data due to dtype(&#39;O&#39;) error, except I&#39;ve replaced all object dtypes Background I have a dataframe imported from an excel doc. Each column is an experiment variable and every row is an entry. The dataframe is 242x18. I am attempting to plot 1x3 lmplot, plottin...
https://stackoverflow.com/questions/75546110/error-on-seaborn-lmplot-when-passing-dataframe-data-due-to-dtypeo-error-exc
python, numpy, seaborn, data-science, visualization
1,677,162,215
se_75566592
stackoverflow
DATA_SCIENCE
Is PySpark rollback possible with parquet files
Is PySpark rollback possible with parquet files I have an ETL pipeline implemented in pyspark. I have implemented change data capture (CDC). Source and destination both are Parquet format tables. My ETL reads a set of tables from source, processes them and stores the same set of tables in destination with additional c...
https://stackoverflow.com/questions/75566592/is-pyspark-rollback-possible-with-parquet-files
pyspark, data-science, bigdata, etl, parquet
1,677,340,036
se_59598646
stackoverflow
DATA_SCIENCE
One hot encoding &quot;got an unexpected keyword argument &#39;categorical_features&#39;&quot;
One hot encoding &quot;got an unexpected keyword argument &#39;categorical_features&#39;&quot; [ error : oneHot = OneHotEncoder(categorical_features = [0]) TypeError: init() got an unexpected keyword argument 'categorical_features'. I'm tring to encode first column here's my code sample: from sklearn.p...
https://stackoverflow.com/questions/59598646/one-hot-encoding-got-an-unexpected-keyword-argument-categorical-features
python, scikit-learn, data-science
1,578,217,677
se_75559958
stackoverflow
DATA_SCIENCE
convert model with tensorflowjs from pb file to json file
convert model with tensorflowjs from pb file to json file I am trying to convert my model (Yolo model) from model.pb to model.json. I trying to do this because I want to load my model directly into my web application (with JavaScript). so I trying to do this with google colab platform and my drive account. my code: !p...
https://stackoverflow.com/questions/75559958/convert-model-with-tensorflowjs-from-pb-file-to-json-file
data-science, artificial-intelligence, tensorflow2.0, tensorflow.js, tensorflowjs-converter
1,677,261,831
se_63866002
stackoverflow
DATA_SCIENCE
How to add error bars to a grouped bar plot
How to add error bars to a grouped bar plot I would like to add error bar in my plot that I can show the min max of each plot. Please, anyone can help me. Thanks in advance. The min max is as follow: Delay = (53.46 (min 0, max60) , 36.22 (min 12,max 70), 83 (min 21,max 54), 17 (min 12,max 70)) Latency = (38 (min 2,max...
https://stackoverflow.com/questions/63866002/how-to-add-error-bars-to-a-grouped-bar-plot
python, pandas, matplotlib, data-science, grouped-bar-chart
1,599,955,838
se_75448437
stackoverflow
DATA_SCIENCE
Data Cleaning Error in Classification KNN Alrogithm Problem
Data Cleaning Error in Classification KNN Alrogithm Problem I believe the error is telling me I have null values in my data and I've tried fixing it but the error keeps appearing. I don't want to delete the null data because I consider it relevant to my analysis. The columns of my data are in this order: 'Titulo', 'Au...
https://stackoverflow.com/questions/75448437/data-cleaning-error-in-classification-knn-alrogithm-problem
scikit-learn, data-science, classification, knn
1,676,380,764
se_75552397
stackoverflow
DATA_SCIENCE
why is model.predict(...) always returning the same answer?
why is model.predict(...) always returning the same answer? I'm trying to use scikit-learn to make predictions based on some client data, to determine a financial benefit estimate based on some answers they give us and based on our historical client projects. My dataset looks like this: # Data (1-15 of 470) array( ...
https://stackoverflow.com/questions/75552397/why-is-model-predict-always-returning-the-same-answer
scikit-learn, data-science, logistic-regression, prediction
1,677,209,801
se_75543182
stackoverflow
DATA_SCIENCE
Machine learning : How to encore a sub-group of features that are only significant together?
Machine learning : How to encore a sub-group of features that are only significant together? Let’s imagine that I have a dataset of animal body attributes with a lot of features (size or arm, torso, leg, each fingers, etc.). One of the sub-group of these features are the length or each finger of the hand. How can I en...
https://stackoverflow.com/questions/75543182/machine-learning-how-to-encore-a-sub-group-of-features-that-are-only-significa
machine-learning, data-science, feature-extraction
1,677,146,265
se_75549625
stackoverflow
DATA_SCIENCE
i want to fit a model in sklearn but it throws an error. below are the lines of code i used
i want to fit a model in sklearn but it throws an error. below are the lines of code i used I used the lines of code below to fit a model in sklearn. linearmodel =LinearRegression() linearmodel.fit(x_train, y_train) but I get this error: ValueError: could not convert string to float: 'Male' what could be wrong?
https://stackoverflow.com/questions/75549625/i-want-to-fit-a-model-in-sklearn-but-it-throws-an-error-below-are-the-lines-of
python, scikit-learn, regression, data-science, data-analysis
1,677,181,529
se_75546446
stackoverflow
DATA_SCIENCE
Code for finding the middle letter of a name in &quot;babynames&quot; dataset is giving faulty result when the name has 6 letters
Code for finding the middle letter of a name in &quot;babynames&quot; dataset is giving faulty result when the name has 6 letters I am trying to solve an exercise question from R for data science (2E) of chapter 16 (16.5.4 question no. 1) which requires to extract the middle letter of every name of the dataset. So I w...
https://stackoverflow.com/questions/75546446/code-for-finding-the-middle-letter-of-a-name-in-babynames-dataset-is-giving-fa
r, tidyverse, data-science
1,677,163,867
se_74935467
stackoverflow
DATA_SCIENCE
&quot;AttributeError: &#39;MiniSom&#39; object has no attribute &#39;cluster_centers_&quot;
&quot;AttributeError: &#39;MiniSom&#39; object has no attribute &#39;cluster_centers_&quot; I'm trying to follow along with this post but when I get to the "Self Organizing Maps (SOMs)" section I run the code and get the following error: AttributeError: 'MiniSom' object has no attribute 'cluster_centers_' It's pretty...
https://stackoverflow.com/questions/74935467/attributeerror-minisom-object-has-no-attribute-cluster-centers
python, data-science, geospatial
1,672,191,023
se_75537452
stackoverflow
DATA_SCIENCE
Returning error after applying SelectPercentile
Returning error after applying SelectPercentile I got an error telling me my data contain np.nan, np.inf or values too large for float64 I was doing automatic feature selection. The features were too much so I want to streamline it down.
https://stackoverflow.com/questions/75537452/returning-error-after-applying-selectpercentile
python, machine-learning, data-science, feature-selection, feature-engineering
1,677,094,879
se_75534063
stackoverflow
DATA_SCIENCE
plotly js is working in Skills Network Labs but not working in vs code
plotly js is working in Skills Network Labs but not working in vs code I'm new in python. Recently I'm working on a code which I had gotten from online platform where I'm using plotly which is working properly in Skills Network Labs but when ever I tried this in vscode it didn't showed any plot in browser and the ter...
https://stackoverflow.com/questions/75534063/plotly-js-is-working-in-skills-network-labs-but-not-working-in-vs-code
javascript, python, visual-studio-code, plotly, data-science
1,677,075,860
se_75526511
stackoverflow
DATA_SCIENCE
How to change the median line color for each violin plot in one ax, using matplotlib?
How to change the median line color for each violin plot in one ax, using matplotlib? This is my code: fig, ax = plt.subplots() parts = ax.violinplot([df1_1['Height'], df1_2['Height'], df1_3['Height']], showmedians=True, vert=False, points=1000, widths=1, showextrema=False) ax.set_title('Height Distributions (2000 - 2...
https://stackoverflow.com/questions/75526511/how-to-change-the-median-line-color-for-each-violin-plot-in-one-ax-using-matplo
matplotlib, plot, data-science, visualization, violin-plot
1,677,018,602
se_50695215
stackoverflow
DATA_SCIENCE
Improving boosting model ,reducing Root mean square error
Improving boosting model ,reducing Root mean square error Hi i am solving a regression problem.My data set consists of 13 features and 550068 rows.I tried different different models and found that boosting algorithms(i.e xgboost,catboost,lightgbm) are performing well on that big data set.here is the code import ligh...
https://stackoverflow.com/questions/50695215/improving-boosting-model-reducing-root-mean-square-error
machine-learning, boost, data-science, xgboost, hyperparameters
1,528,186,184
se_75521151
stackoverflow
DATA_SCIENCE
Pandas - Group by week while maintaining perfect chronological records
Pandas - Group by week while maintaining perfect chronological records We have a dataframe that has break events that have happened on a production line. # Example dataframe df = pd.DataFrame({ 'RSNCODE': ['300.306', '100.102', '300.306'], 'BEGTIME': ['2022-06-08 22:21:47', '2022-06-22 14:00:00', '2022-07-25 2...
https://stackoverflow.com/questions/75521151/pandas-group-by-week-while-maintaining-perfect-chronological-records
python, pandas, data-science, data-analysis
1,676,985,988
se_75476211
stackoverflow
DATA_SCIENCE
Imputation after one hot encoding in scikit-learn
Imputation after one hot encoding in scikit-learn I have a dataset where I have categorical and numerical data. I want to - Apply OneHot encoding for all categorical columns Use the numerical data + one-hot encoded categorical data to do Multiple Imputation using IterativeImputer. Integrate it to a pipeline where I h...
https://stackoverflow.com/questions/75476211/imputation-after-one-hot-encoding-in-scikit-learn
python, machine-learning, data-science, data-preprocessing
1,676,570,229
se_75511441
stackoverflow
DATA_SCIENCE
How do i select cells in a column that contain date type values in pandas
How do i select cells in a column that contain date type values in pandas I want to look up the row that contains Transitioning EIN in the Unnamed 17 column and the date of 2021-01-29 in Unnamed 13 column. pic I tried this: df.loc[(df['Unnamed: 17']=='Transitioning EIN') & (df['Unnamed: 13']=="2021-01-29 00:00:00")] ...
https://stackoverflow.com/questions/75511441/how-do-i-select-cells-in-a-column-that-contain-date-type-values-in-pandas
python, pandas, data-science, data-analysis
1,676,908,221
se_75510617
stackoverflow
DATA_SCIENCE
is argument type int is not iterable
is argument type int is not iterable Post=list( df ['Posts']) Post 1=list() for num in Post: if 'k' in num: new_num=1000*float(num.replace('k','')) Post1.append(new_num) else: Post1.append(float(num)) df['Posts']=Post1 TypeError Traceback (most recent call last) Input In [37], in <cell...
https://stackoverflow.com/questions/75510617/is-argument-type-int-is-not-iterable
python, data-science
1,676,903,706
se_75508259
stackoverflow
DATA_SCIENCE
How to visualize how a standard distribution fit the histogram of your data (another distribution)?
How to visualize how a standard distribution fit the histogram of your data (another distribution)? I have two blocks of code and two graphs: import matplotlib.pyplot as plt import numpy as np import scipy.stats as stats import math import seaborn as sns mu = 0 variance = 1 sigma = math.sqrt(variance) x = np.linspac...
https://stackoverflow.com/questions/75508259/how-to-visualize-how-a-standard-distribution-fit-the-histogram-of-your-data-ano
python, matplotlib, seaborn, data-science, visualization
1,676,890,076
se_75507870
stackoverflow
DATA_SCIENCE
ValueError(f&quot;x and y must have same first dimension, but &quot; ValueError: x and y must have same first dimension, but have shapes (5,) and (4,)
ValueError(f&quot;x and y must have same first dimension, but &quot; ValueError: x and y must have same first dimension, but have shapes (5,) and (4,) I´m trying to plot the mean, standard deviation, standard error(part of the code is Norwegian) but I got the error: 4.23 4.27] Traceback (most recent call last): Fil...
https://stackoverflow.com/questions/75507870/valueerrorfx-and-y-must-have-same-first-dimension-but-valueerror-x-and-y-m
python, data-science
1,676,887,727
se_75503713
stackoverflow
DATA_SCIENCE
Extracting longtitude and latitude for plotly interactive map
Extracting longtitude and latitude for plotly interactive map I searched for videos on youtube concerning working with latitude and longtitude for creating interactive map. I have a dataset on earthquakes,where the longtitude and latitude are both float: Significant_Earthquakes_1900_2023 I tried to use this code unsuc...
https://stackoverflow.com/questions/75503713/extracting-longtitude-and-latitude-for-plotly-interactive-map
python, plotly, data-science, geojson
1,676,843,919
se_51372375
stackoverflow
DATA_SCIENCE
Data Science: How to process and clean data when csv file has thousands of columns
Data Science: How to process and clean data when csv file has thousands of columns I am new in data Science and doing self learning. I have gone through all Data Science concepts and trying apply. For Data Set i visited Kaggle and picked up a Data File. However there are more than four thousands columns in csv file. S...
https://stackoverflow.com/questions/51372375/data-science-how-to-process-and-clean-data-when-csv-file-has-thousands-of-colum
machine-learning, data-science
1,531,794,113
se_75500721
stackoverflow
DATA_SCIENCE
How can I optimize my code so my Google Colab doens&#39;t crash
How can I optimize my code so my Google Colab doens&#39;t crash I ran into a issue where Google Colab's ram is running out. I use the free version and I'm not sure if it's because it can't handle or if my code is very bad optimized. As I'm new to the field I believe my code is very slow and badly optimized. Wanted to ...
https://stackoverflow.com/questions/75500721/how-can-i-optimize-my-code-so-my-google-colab-doenst-crash
python, pandas, optimization, data-science, google-colaboratory
1,676,815,941
se_75496248
stackoverflow
DATA_SCIENCE
Scikit Learn KernelDensity and GridSearchCV
Scikit Learn KernelDensity and GridSearchCV I am new to data science and doing a project about Kernel Density Estimation, specifically about finding the best bandwidth and kernel function to use. I want to use Scikit Learn's KernelDensity which allows choosing the bandwidth and the kernel. I need to use some datasets ...
https://stackoverflow.com/questions/75496248/scikit-learn-kerneldensity-and-gridsearchcv
python, machine-learning, scikit-learn, data-science, kernel-density
1,676,752,677
se_75500955
stackoverflow
DATA_SCIENCE
ValueError: could not convert string to float: &#39;4223-BKEOR&#39;
ValueError: could not convert string to float: &#39;4223-BKEOR&#39; directory = "path/to/directory" filename = "C:\\Users\\home\\Desktop\\Python Projects\\TelcomCustomer-Churn_2.csv" full_path = os.path.join(directory, filename) def load_csv(path='C:\\Users\\home\\Desktop\\Python Projects\\TelcomCustomer-Churn_2.csv'...
https://stackoverflow.com/questions/75500955/valueerror-could-not-convert-string-to-float-4223-bkeor
python, data-science
1,676,818,202
se_75500734
stackoverflow
DATA_SCIENCE
Cannot set a DataFrame with multiple columns to the single column total_servings
Cannot set a DataFrame with multiple columns to the single column total_servings I am a beginner and getting familiar with pandas . It is throwing an error , When I was trying to create a new column this way : drinks['total_servings'] = drinks.loc[: ,'beer_servings':'wine_servings'].apply(calculate,axis=1) Below is my...
https://stackoverflow.com/questions/75500734/cannot-set-a-dataframe-with-multiple-columns-to-the-single-column-total-servings
python, data-science
1,676,816,070
se_75154911
stackoverflow
DATA_SCIENCE
MPL Basemap Projections not showing output properly
MPL Basemap Projections not showing output properly So I have this old code from my teacher that plots a Mollweide Projection using Basemap import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.basemap import Basemap from itertools import chain def draw_map(m, scale=0.2): # draw a shaded-relief imag...
https://stackoverflow.com/questions/75154911/mpl-basemap-projections-not-showing-output-properly
python-3.x, jupyter-notebook, data-science, matplotlib-basemap, map-projections
1,674,018,539
se_75390699
stackoverflow
DATA_SCIENCE
I have used softmax function with loss=&#39;binary_crossentropy&#39; for a two class classification problem
I have used softmax function with loss=&#39;binary_crossentropy&#39; for a two class classification problem for two class classification problem sigmoid + binary_crossentropy is fine or softmax + categorical_crossentropy is fine. But in my case I have used softmax(2 dense layers) + binary_crossentropy and trained a D...
https://stackoverflow.com/questions/75390699/i-have-used-softmax-function-with-loss-binary-crossentropy-for-a-two-class-cla
machine-learning, deep-learning, data-science, loss-function, image-classification
1,675,883,789
se_75495660
stackoverflow
DATA_SCIENCE
Subtract two columns from different DataFrame
Subtract two columns from different DataFrame I want to subtract column Country from DataFrame dfA with column Country in DataFrame dfB. I'm trying the following code: A_minus_B = dfA['Country'] - dfB['Country'] Typerror: - with str & str What I'm expecting is: dfA Country 1. United States 2. Puerto Rico 3. Colombia...
https://stackoverflow.com/questions/75495660/subtract-two-columns-from-different-dataframe
python, pandas, data-science
1,676,746,471
se_75496349
stackoverflow
DATA_SCIENCE
I am seeing this error in server.py file, &quot; The browser (or proxy) sent a request that this server could not understand.&quot;
I am seeing this error in server.py file, &quot; The browser (or proxy) sent a request that this server could not understand.&quot; Here I am attaching my server.py and util.py I have trained a model, and now wish to print the data on user's demand. server.py from flask import Flask, request, jsonify #from waitress im...
https://stackoverflow.com/questions/75496349/i-am-seeing-this-error-in-server-py-file-the-browser-or-proxy-sent-a-reques
python, machine-learning, flask, data-science, data-analysis
1,676,753,805
se_73612523
stackoverflow
DATA_SCIENCE
About Data Cleaning
About Data Cleaning I am a pretty amateur data science student and I am working on a project where I compared two servers in a team based game but my two datasets are formatted differently from one another. One column for instance would be first blood, where one set of data stores this information as "blue_team_first_...
https://stackoverflow.com/questions/73612523/about-data-cleaning
python, sql, pandas, data-science, data-analysis
1,662,396,671
se_75465047
stackoverflow
DATA_SCIENCE
Trying to predict probability score using test data
Trying to predict probability score using test data I'm currently trying to test features and impacts to probability score on regression model we've built. I'm trying to test impacts of age on proba score to see if we need to retrain our model. I'm using parameters from our model as Param_Collection and using test dat...
https://stackoverflow.com/questions/75465047/trying-to-predict-probability-score-using-test-data
python, data-science, probability
1,676,492,178
se_75488329
stackoverflow
DATA_SCIENCE
SHAP summary_plot for multilabel classification
SHAP summary_plot for multilabel classification I am trying to build a summary_plot using SHAP for multilabel problem, but labels overlap the plot, how can I fix that? plt.subplots_adjust() didn't help.
https://stackoverflow.com/questions/75488329/shap-summary-plot-for-multilabel-classification
python, plot, data-science, visualization, shap
1,676,660,509
se_75487653
stackoverflow
DATA_SCIENCE
Calculate Percentage difference among values and create groups
Calculate Percentage difference among values and create groups Isthere any python library available which can help us to perform all the actions shown in picture? Does this fall under data science category?
https://stackoverflow.com/questions/75487653/calculate-percentage-difference-among-values-and-create-groups
python, numpy, pyspark, data-science
1,676,656,069
se_75489934
stackoverflow
DATA_SCIENCE
Vectorized multi index operation without any looping or hard coding
Vectorized multi index operation without any looping or hard coding I'm not sure if my request is possible, but here's what I'd like to do: Create a dataframe with N multi indexes and 2 columns (X and Y) for each multi index. then I want to create a Z column for each multi index with is a sum of X and Y columns of th...
https://stackoverflow.com/questions/75489934/vectorized-multi-index-operation-without-any-looping-or-hard-coding
python, pandas, data-science, vectorization, multi-index
1,676,674,457
se_75484347
stackoverflow
DATA_SCIENCE
Evaluating test dataset
Evaluating test dataset For most competitions, the data is split into a training data and test data. I worked on the training data(spliting it into x_train...) and created a model, i evaluated it and got the respective accuracy score. I used the same model to predict the test dataset that was left out, however, when i...
https://stackoverflow.com/questions/75484347/evaluating-test-dataset
python, pandas, machine-learning, data-science
1,676,637,172
se_75487675
stackoverflow
DATA_SCIENCE
Speeding up for-loops using pandas for feature engineering
Speeding up for-loops using pandas for feature engineering I have a dataframe with the following headings: payer recipient_country date of payment Each rows shows a transaction, and a row (Bob,UK,1st January 2023) shows that a payer Bob sent a payment to the UK on 1st January 2023. For each row in this table I need ...
https://stackoverflow.com/questions/75487675/speeding-up-for-loops-using-pandas-for-feature-engineering
python, pandas, data-science, feature-engineering
1,676,656,182
se_75487455
stackoverflow
DATA_SCIENCE
What is my output size for my Keras Embedding layer?
What is my output size for my Keras Embedding layer? I can't seem to find the correct Keras output dim size for my model. How do you calculate this? top_words = 2000 (X_train, y_train), (X_test, y_test) = imdb.load_data(num_words=top_words) # pad dataset to a maximum review length in words max_words = 30 X_train = seq...
https://stackoverflow.com/questions/75487455/what-is-my-output-size-for-my-keras-embedding-layer
python, tensorflow, keras, deep-learning, data-science
1,676,654,836
se_75487417
stackoverflow
DATA_SCIENCE
Visualising entity density on a 2D plane using pcolormesh in matplotlib, Python
Visualising entity density on a 2D plane using pcolormesh in matplotlib, Python I am trying to recreate the following heatmap (created with R) with Python. This heatmap represents the entity concentration in a room, where the lighter color equate denser entity. The X axis is length in meters and the Y axis is height ...
https://stackoverflow.com/questions/75487417/visualising-entity-density-on-a-2d-plane-using-pcolormesh-in-matplotlib-python
python, pandas, matplotlib, data-science, heatmap
1,676,654,578
se_75484532
stackoverflow
DATA_SCIENCE
How to put labels to the graph line on the plot at certain x points
How to put labels to the graph line on the plot at certain x points I'm new to data scinece and I need any help, please. I need to put labels from column (integers) on to the graphed line on the plot at certain x points, like x=20, then, x=50, then x=80 or at least every 20-30 steps. I am using geam_text, but it puts ...
https://stackoverflow.com/questions/75484532/how-to-put-labels-to-the-graph-line-on-the-plot-at-certain-x-points
r, ggplot2, data-science, visualization
1,676,638,215
se_75479651
stackoverflow
DATA_SCIENCE
How to scrap hidden data that it shows until you click a button from web with Python
How to scrap hidden data that it shows until you click a button from web with Python I'm looking to extract data from a webpage using Python's Selenium library. However, I'm facing a challenge because the webpage has multiple tables that are only displayed after clicking a button. As a result, when I attempt to extrac...
https://stackoverflow.com/questions/75479651/how-to-scrap-hidden-data-that-it-shows-until-you-click-a-button-from-web-with-py
python, selenium-webdriver, web-scraping, jupyter-notebook, data-science
1,676,599,939
se_75420887
stackoverflow
DATA_SCIENCE
How to convert string array data type to float array data type?
How to convert string array data type to float array data type? I am working on thermal sensor data. The first three data are as follows. Data is in an array of strings. Please find the data link here drive.google.com/file/d/1EfJOFszf7z1aOosc-PbKSsYcEE8ePjLk/…. Thank you so much for helping. [25.64177131652832, 25.456...
https://stackoverflow.com/questions/75420887/how-to-convert-string-array-data-type-to-float-array-data-type
python-3.x, pandas, dataframe, machine-learning, data-science
1,676,126,039
se_70633347
stackoverflow
DATA_SCIENCE
How to concatenate same row names in same column on Python DataFrame
How to concatenate same row names in same column on Python DataFrame I have a simple dataframe like this: df = pd.DataFrame({'class':['a','b','c','d','e'], 'name':['Adi','leon','adi','leo','andy'], 'age':['9','8','9','9','8'], 'score':['40','90','35','95','85']}) ...
https://stackoverflow.com/questions/70633347/how-to-concatenate-same-row-names-in-same-column-on-python-dataframe
python, dataframe, data-science
1,641,652,689
se_75468375
stackoverflow
DATA_SCIENCE
How to turn the first image into the second using python pandas?
How to turn the first image into the second using python pandas? I want to only keep the last location(level2) entry for every last name (eg:Balchunias,London etc). How do i do it? I want to turn this: to this:
https://stackoverflow.com/questions/75468375/how-to-turn-the-first-image-into-the-second-using-python-pandas
python, excel, pandas, data-science, data-analysis
1,676,527,118
se_68417246
stackoverflow
DATA_SCIENCE
Affinity propagation did not converge, this model will not have any cluster centers
Affinity propagation did not converge, this model will not have any cluster centers When I try to cluster using affinity propagation, the below error occurs and the number of clusters is one. "...\anaconda\lib\site-packages\sklearn\cluster\_affinity_propagation.py:246: ConvergenceWarning: Affinity propagation did not ...
https://stackoverflow.com/questions/68417246/affinity-propagation-did-not-converge-this-model-will-not-have-any-cluster-cent
python, text, nlp, data-science
1,626,493,852
se_75462377
stackoverflow
DATA_SCIENCE
Poetry: How to update the &quot;joblib&quot; under dependencies &quot;scikit-learn&quot;
Poetry: How to update the &quot;joblib&quot; under dependencies &quot;scikit-learn&quot; How to update the joblib to 1.2.1. Usually in Package.json as the work around Resolution is being used to add the packages with specific version. Similarly do we have any such provision in Poetry. Github vulnerability joblib (pip)...
https://stackoverflow.com/questions/75462377/poetry-how-to-update-the-joblib-under-dependencies-scikit-learn
python-3.x, python-2.7, machine-learning, data-science, python-poetry
1,676,476,800
se_58473837
stackoverflow
DATA_SCIENCE
Plotly missing orca
Plotly missing orca I have small problem when exporting static chart using plotly. Plotly does not correctly recognize that I have orca installed and I have still error related to missing orca. I try to change the orca directory but it is still not working. Anyone who knows what is wrong? My code: import plotly.gra...
https://stackoverflow.com/questions/58473837/plotly-missing-orca
python, plotly, data-science, orca
1,571,580,622
se_75458781
stackoverflow
DATA_SCIENCE
can we calculate model accuracy from MAPE or MAE?
can we calculate model accuracy from MAPE or MAE? In a linear regression model, if MAPE or MAE is caculated, then can we conclude that the regression model accuracy is (1- MAE)*100? as the MAPE value mostly ranges under 100 and it is commonly used error metric in regression.
https://stackoverflow.com/questions/75458781/can-we-calculate-model-accuracy-from-mape-or-mae
statistics, regression, data-science
1,676,458,692
se_75423727
stackoverflow
DATA_SCIENCE
Compare two columns in panda but with a specific value by row
Compare two columns in panda but with a specific value by row I need to compare two columns with specific values to get a sum at the end of all the records that match. For example: in the 'Survived' column the value for each record must be 1 and for the 'Pclass' column the value of the record can be 1 or 2 I tried the...
https://stackoverflow.com/questions/75423727/compare-two-columns-in-panda-but-with-a-specific-value-by-row
python, pandas, numpy, data-science
1,676,154,650
se_67130612
stackoverflow
DATA_SCIENCE
my Rainfall Dataset has no Seasonality and is stationary?
my Rainfall Dataset has no Seasonality and is stationary? I have a dataset (timeseries from 2010 to 2019 rainfall data from various districts near vellore). When I ran the ADF(Augmented Dickey-Fuller Test) i got my dataset to be Stationary! meaning no seasonality! My question is that am I doing something wrong? becaus...
https://stackoverflow.com/questions/67130612/my-rainfall-dataset-has-no-seasonality-and-is-stationary
time-series, data-science, statsmodels, arima, statistical-test
1,618,598,644
se_75450354
stackoverflow
DATA_SCIENCE
Pandas set_index not setting index
Pandas set_index not setting index I'm trying to set the index of a df, except it doesn't work: def save_to_csv(timestamps, values, lower, upper, query): df = pd.DataFrame({'Time': timestamps, f'Q50-{format_filename(query)}': values}) df.set_index('Time') df['Time'] = df['Time'].dt.strftime('%Y-%m-%dT%H:%M:%S') print(...
https://stackoverflow.com/questions/75450354/pandas-set-index-not-setting-index
python, pandas, dataframe, data-science
1,676,390,492
se_75449972
stackoverflow
DATA_SCIENCE
Does retraining the ML with the same dataset count an epoch?
Does retraining the ML with the same dataset count an epoch? I developed the ML for my research, and it needs to be trained with a large amount of data, actually I have to train it for 100 epochs. But, my macbook (m2 13") can't hold it, and also I have to use my laptop for studying, so I can't leave it train all day. ...
https://stackoverflow.com/questions/75449972/does-retraining-the-ml-with-the-same-dataset-count-an-epoch
python, machine-learning, data-science, artificial-intelligence, epoch
1,676,388,340
se_68874492
stackoverflow
DATA_SCIENCE
Preserve column order after applying sklearn.compose.ColumnTransformer
Preserve column order after applying sklearn.compose.ColumnTransformer I'm using Pipeline and ColumnTransformer modules from sklearn library to perform feature engineering on my dataset. The dataset initially looks like this: date date_block_num shop_id item_id item_price 02.01.2013 0 59 22154 999.00 03.01.2...
https://stackoverflow.com/questions/68874492/preserve-column-order-after-applying-sklearn-compose-columntransformer
python, pandas, scikit-learn, data-science
1,629,560,552