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_74761900
stackoverflow
DATA_SCIENCE
Error message: Error in data$CVDSTRK3 : object of type 'closure' is not subsettable
Error message: Error in data$CVDSTRK3 : object of type &#39;closure&#39; is not subsettable Q<-patients_with_stroke <- data[data$CVDSTRK3==1,] max_numwomen<-max(patients_with_stroke$NUMWOMEN, na.rm = TRUE) max_numwomen Please help. I tried to find the highest value for number of adult women in the household where som...
https://stackoverflow.com/questions/74761900/error-message-error-in-datacvdstrk3-object-of-type-closure-is-not-subsetta
r, data-science, data-analysis
1,670,771,154
se_76240159
stackoverflow
DATA_SCIENCE
Productivity Mix Analysis - statistics
Productivity Mix Analysis - statistics I am trying to generate labor standards (the amount of productivity per hour an employee should be accomplishing) based off of historical data volumes. I do not have the start and end time that a specific task was completed or started. I do however have various dimensions related...
https://stackoverflow.com/questions/76240159/productivity-mix-analysis-statistics
pandas, statistics, regression, data-analysis, correlation
1,683,928,544
se_71988051
stackoverflow
DATA_SCIENCE
Formula/constant to replace a table into just one formula
Formula/constant to replace a table into just one formula In the below table I got some values where the column headers represent the density where the first column of the table represent a temperature. Density/Temp 0.5 0.505 0.51 0.515 0.52 0.525 0.53 0.535 0.54 0.545 0.55 -2.5 1.051 1.05 1.048 1.047 1.046 1....
https://stackoverflow.com/questions/71988051/formula-constant-to-replace-a-table-into-just-one-formula
python, excel, vba, data-analysis, mathematical-optimization
1,650,800,637
se_76244605
stackoverflow
DATA_SCIENCE
How to save the changes after a loop in python?
How to save the changes after a loop in python? for i in data['test preparation course']: if i == 'none': i = None here, I'm trying to convert 'none' string with None values in python, and it went well. I just want to activate the changes on the dataset
https://stackoverflow.com/questions/76244605/how-to-save-the-changes-after-a-loop-in-python
python, pandas, data-science, data-analysis, data-cleaning
1,684,007,305
se_76236158
stackoverflow
DATA_SCIENCE
Efficiently assign jobs to processes in python multiprocessing
Efficiently assign jobs to processes in python multiprocessing I am trying to solve an interesting parallelization problem with python. Let's say I have some data that needs to be processed and I have 2 processes running in parallel using multiprocessing. I can split my data into 2 parts, giving one part to each proce...
https://stackoverflow.com/questions/76236158/efficiently-assign-jobs-to-processes-in-python-multiprocessing
python, multiprocessing, data-analysis
1,683,893,486
se_76242851
stackoverflow
DATA_SCIENCE
Pandas - Merging 3rd data frame not merging on key values
Pandas - Merging 3rd data frame not merging on key values I am new to python and data analysis, so I apologise if this is very basic, but I am a little bit stuck I have 3 data frames, schools 1, 2 & 3. Each has a Unique Reference Number (URN) and then additional data about the schools In the dataset URN1 is an int, UR...
https://stackoverflow.com/questions/76242851/pandas-merging-3rd-data-frame-not-merging-on-key-values
python, pandas, dataframe, data-analysis
1,683,982,577
se_76236394
stackoverflow
DATA_SCIENCE
How to classify groups based on changes from the previous period in PostgreSQL?
How to classify groups based on changes from the previous period in PostgreSQL? Good day to everyone! I have a table with some teams and their rating for the period. Data looks like this: team date rating team_1 2022-09 7.5 team_1 2022-12 8 team_1 2023-03 8.5 team_2 2022-09 8 team_2 2022-12 7 team_2 ...
https://stackoverflow.com/questions/76236394/how-to-classify-groups-based-on-changes-from-the-previous-period-in-postgresql
sql, postgresql, data-analysis, window-functions
1,683,895,053
se_66917445
stackoverflow
DATA_SCIENCE
Complete Cryptocurrencies Data
Complete Cryptocurrencies Data I am working on cryptocurrencies blockchain data and I want data from the beginning of the time of that particular cryptocurrency. Is there any way to download complete block data in the Postgresql file? https://blockchair.com/dumps is although offering this but they limit the download s...
https://stackoverflow.com/questions/66917445/complete-cryptocurrencies-data
data-science, blockchain, data-analysis, bitcoin, cryptocurrency
1,617,356,831
se_76219944
stackoverflow
DATA_SCIENCE
Can&#39;t Retrieve Upper &amp; Lower Bands from iBand
Can&#39;t Retrieve Upper &amp; Lower Bands from iBand I'm trying to get the upper and lower values from iBand... void OnTick() { double upperBand[]; double lowerBand[]; double range; int handle = iBands(_Symbol, _Period, 20, 2, 0, PRICE_CLOSE); // CopyBuffer(handle, which band, period, no. values,...
https://stackoverflow.com/questions/76219944/cant-retrieve-upper-lower-bands-from-iband
function, data-analysis, mql5
1,683,730,767
se_74940029
stackoverflow
DATA_SCIENCE
How do I remove a Moir&#233; pattern from such a polar plot?
How do I remove a Moir&#233; pattern from such a polar plot? How do I remove a Moiré pattern in a polar plot generate by Plotlib? I tried resizing the figure, but while improving a bit, once I increased too much the size the RAM fails. I tried cv2 for image antialising, but to no avail. Any hint?
https://stackoverflow.com/questions/74940029/how-do-i-remove-a-moir%c3%a9-pattern-from-such-a-polar-plot
matplotlib, plot, data-analysis, antialiasing, radial
1,672,228,989
se_76213535
stackoverflow
DATA_SCIENCE
Calculate XY polar coordinates to place an object right below a value label
Calculate XY polar coordinates to place an object right below a value label Consider the following dataset: ig_5 <- data.frame( category = c("A", "B", "C", "D", "E", "F"), prop = c(0.1, 0.2, 0.15, 0.25, 0.05, 0.25) ) %>% mutate(lab.ypos = cumsum(prop) - 0.5*prop) I created a donut chart with the following code:...
https://stackoverflow.com/questions/76213535/calculate-xy-polar-coordinates-to-place-an-object-right-below-a-value-label
r, ggplot2, math, visualization, data-analysis
1,683,668,375
se_76202898
stackoverflow
DATA_SCIENCE
Unable to run the given code to read the file add new column and want to read the 5 rows in windows
Unable to run the given code to read the file add new column and want to read the 5 rows in windows import pandas as pd sample_import=pd.read_csv('C:/Users/HP/Desktop/python programing/allpythonfiles/simple_csv.csv') new_column_values=list(range(1,10)) sample_import['new_column'] = new_column_values[:len(sample_impor...
https://stackoverflow.com/questions/76202898/unable-to-run-the-given-code-to-read-the-file-add-new-column-and-want-to-read-th
python, data-analysis
1,683,566,716
se_76201667
stackoverflow
DATA_SCIENCE
Drop duplicates with a cache&#39;s rule
Drop duplicates with a cache&#39;s rule I have a dataframe with two columns (Id and Datetime), i have to drop duplicated rows related to the same id considering the datetime column. The rule is that I need to check subsequent dates, and if they're on the same day, or the day after (not 48 hours, but the day after, unt...
https://stackoverflow.com/questions/76201667/drop-duplicates-with-a-caches-rule
python, pandas, dataframe, numpy, data-analysis
1,683,556,912
se_76187160
stackoverflow
DATA_SCIENCE
Adding callbacks (interactive inputs) to page container in plotly dash multi pages app
Adding callbacks (interactive inputs) to page container in plotly dash multi pages app Context: I am working on an app with multi pages feature in Plotly Dash that uses this schema: |app.py | pages| | games_*dashboard.py | |channels_dashboard.py | | *videos_dashboard.py The project is talking about youtube gaming anal...
https://stackoverflow.com/questions/76187160/adding-callbacks-interactive-inputs-to-page-container-in-plotly-dash-multi-pag
python, callback, plotly, data-analysis, plotly-dash
1,683,348,022
se_75464638
stackoverflow
DATA_SCIENCE
How to delete specific cells in a pandas dataframe giving some conditions?
How to delete specific cells in a pandas dataframe giving some conditions? I want to clear the contents of the first two cells in location for every first 2 duplicates in last name. For eg: i want to clear out the 1st 2 location occurances for Balchuinas and only keep the 3rd one. Same goes for London and Fleck. I ONL...
https://stackoverflow.com/questions/75464638/how-to-delete-specific-cells-in-a-pandas-dataframe-giving-some-conditions
python, pandas, data-science, data-analysis
1,676,489,545
se_76172757
stackoverflow
DATA_SCIENCE
How to extract email addresses from a string in python
How to extract email addresses from a string in python I created a function that takes the entire string from any column in my dataset and extracts the email address if there is no email, it should fill the space with NaN: def extract_email_ID(string): email = re.findall(r'<(.+?)>', string) if not email: ...
https://stackoverflow.com/questions/76172757/how-to-extract-email-addresses-from-a-string-in-python
python, pandas, dataframe, numpy, data-analysis
1,683,200,365
se_76170850
stackoverflow
DATA_SCIENCE
optimize query taking too long to run
optimize query taking too long to run I am trying to run a SQL query in azure databricks. But this query is taking too long to execute. Could you please suggest what optimization I can do in this below query to make it more faster SELECT LOWER(get_json_object(element_at(params,'ans.client_payload'), '$.ACTIONBLOCK_ID...
https://stackoverflow.com/questions/76170850/optimize-query-taking-too-long-to-run
sql, data-analysis, azure-databricks
1,683,187,244
se_74280610
stackoverflow
DATA_SCIENCE
Big Query Public Data
Big Query Public Data How to pin bigquery-public-data to explorer menu after it is under the explorer menu. I am trying since morning but unable to do so. I searched public in explorer menu and bigquery-public-data is visible under explorer menu but now I don't know how to pin it.
https://stackoverflow.com/questions/74280610/big-query-public-data
sql, database, google-bigquery, data-analysis, bigquery-public-datasets
1,667,329,133
se_76159663
stackoverflow
DATA_SCIENCE
Converting daily data to fiscal yearly data
Converting daily data to fiscal yearly data I am trying to train a machine learning model to predict the crop yield of each district of Nepal. The input features will be various weather related data such as temperature, wind speed, etc. and the crop yield is to be predicted based on those data. For the purpose of trai...
https://stackoverflow.com/questions/76159663/converting-daily-data-to-fiscal-yearly-data
python, pandas, data-analysis
1,683,072,591
se_76149337
stackoverflow
DATA_SCIENCE
Finding sequential patterns in data (efficiency question)
Finding sequential patterns in data (efficiency question) I am writing some JavaScript code to do statistical anomaly detection, and I am programmatically analyzing data from a Control Chart. (Shout out to my Lean Six Sigma friends out there.) There are a number of rules that, if they are broken, identifies a potentia...
https://stackoverflow.com/questions/76149337/finding-sequential-patterns-in-data-efficiency-question
javascript, node.js, data-analysis, anomaly-detection
1,682,966,390
se_76145163
stackoverflow
DATA_SCIENCE
How do I add dynamic relational values together inside a single measure without calculated columns?
How do I add dynamic relational values together inside a single measure without calculated columns? This is an example that I'm using to verify my formula: director actor date_added show_id x a 2015 Meow x b 2015 Meow x a 2020 Woof x ...
https://stackoverflow.com/questions/76145163/how-do-i-add-dynamic-relational-values-together-inside-a-single-measure-without
powerbi, dax, data-analysis
1,682,923,449
se_76129245
stackoverflow
DATA_SCIENCE
How do I conduct hundreds of regressions, extract statistics and output these into a table?
How do I conduct hundreds of regressions, extract statistics and output these into a table? I need to conduct hundreds of multiple regression models on several variables in my dataset. There are too many to run manually and I need to extract their results into one big table. My real dataset contains data on blood prot...
https://stackoverflow.com/questions/76129245/how-do-i-conduct-hundreds-of-regressions-extract-statistics-and-output-these-in
r, automation, regression, data-analysis
1,682,682,265
se_76127564
stackoverflow
DATA_SCIENCE
How to do web scraping to extract product data(product name, price) from Lazada by using Python?
How to do web scraping to extract product data(product name, price) from Lazada by using Python? I have been told to scraping the product data(product name and price) from Lazada Website by using Python. However, I have no idea how to execute even after searching all the solution from internet. Does anyone could help ...
https://stackoverflow.com/questions/76127564/how-to-do-web-scraping-to-extract-product-dataproduct-name-price-from-lazada
python, web-scraping, e-commerce, product, data-analysis
1,682,669,757
se_76116957
stackoverflow
DATA_SCIENCE
Update string column having array of json strings using SQL
Update string column having array of json strings using SQL I have a table (lets call it TableX) with two columns id colX 123 { "name": "abc", "type": "solid"}, { "name": "xyz", "type": "liquid"} 456 { "name": "xyz", "type": "liquid"} colX is of type nvarchar having values comma separated...
https://stackoverflow.com/questions/76116957/update-string-column-having-array-of-json-strings-using-sql
sql, mysql, data-analysis, azure-synapse, analysis
1,682,572,602
se_76123769
stackoverflow
DATA_SCIENCE
Create a 3d array from a data frames of x,y,z data
Create a 3d array from a data frames of x,y,z data I can think of several dumb ways to do this involving a lot of loops and if statments, but I am wondering if anyone has a smart way. I have a data frame that has columns of different types of x,y, and z data and I would like to turn that into different 3d arrays. IE d...
https://stackoverflow.com/questions/76123769/create-a-3d-array-from-a-data-frames-of-x-y-z-data
python, pandas, dataframe, data-analysis
1,682,621,633
se_76122528
stackoverflow
DATA_SCIENCE
How to cluster a massive amount of data that doesn&#39;t fit into memory?
How to cluster a massive amount of data that doesn&#39;t fit into memory? I have 30 files, each is a dictionary with about 1M keys that map to embeddings: file_1 = {key_1: some_array, key_2: some_array ...} file_2 = {key_13: some_array, key_21: some_array ...} ... file_30 = {key_123: some_array, key_9: some_array ....
https://stackoverflow.com/questions/76122528/how-to-cluster-a-massive-amount-of-data-that-doesnt-fit-into-memory
python, machine-learning, data-science, cluster-analysis, data-analysis
1,682,611,677
se_75387421
stackoverflow
DATA_SCIENCE
Cleaning data in pandas not working as expected
Cleaning data in pandas not working as expected I have a Google Spreadsheet with info I've been gathering for a month. https://docs.google.com/spreadsheets/d/e/2PACX-1vSeua1He863Vya90JBlnkRvpyErGT6vQJKGmJAGE4F8wibw1LdiR9UKA_TTrVeAeaPzm86V4cE8cq6f/pubhtml I'm trying to do some Data Analysis to find if there's a relatio...
https://stackoverflow.com/questions/75387421/cleaning-data-in-pandas-not-working-as-expected
pandas, data-analysis, data-cleaning
1,675,867,443
se_76087311
stackoverflow
DATA_SCIENCE
reindexing data to DateTimeIndex results in all price data becoming NaN
reindexing data to DateTimeIndex results in all price data becoming NaN gold = pd.read_csv('gold.csv') gold['Date'] = gold['Date'].apply(pd.to_datetime, utc=True) gold Date Price 0 1950-01-01 00:00:00+00:00 34.730 1 1950-02-01 00:00:00+00:00 34.730 2 1950-03-01 00:00:00+00:00 ...
https://stackoverflow.com/questions/76087311/reindexing-data-to-datetimeindex-results-in-all-price-data-becoming-nan
python, python-3.x, pandas, jupyter-notebook, data-analysis
1,682,284,672
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_76078863
stackoverflow
DATA_SCIENCE
Stata Error : Too Many Variables Specified
Stata Error : Too Many Variables Specified I am creating a frequency bar chart in Stata for a defined list of options. But I got this error on tabulate command "Too many variables specified". Create a new variable for each response option gen option1 = strpos(question, "Option A") > 0 gen option2 = strpos(question, ...
https://stackoverflow.com/questions/76078863/stata-error-too-many-variables-specified
statistics, data-analysis, stata
1,682,154,790
se_59200244
stackoverflow
DATA_SCIENCE
I need a solution to this SQL Query I&#39;m trying to solve
I need a solution to this SQL Query I&#39;m trying to solve "Write a query that determines the customer that has spent the most on music for each country. Write a query that returns the country along with the top customer and how much they spent. For countries where the top amount spent is shared, provide all cu...
https://stackoverflow.com/questions/59200244/i-need-a-solution-to-this-sql-query-im-trying-to-solve
sql, data-analysis
1,575,566,284
se_76058163
stackoverflow
DATA_SCIENCE
Dropping outliers from dataset
Dropping outliers from dataset I am trying to drop the indexes where outliers are present, but i am getting the error while dropping them. I am new in this, could you please help me in this. Here the code: here is the error:
https://stackoverflow.com/questions/76058163/dropping-outliers-from-dataset
machine-learning, data-analysis, outliers, feature-engineering, data-preprocessing
1,681,932,349
se_76067736
stackoverflow
DATA_SCIENCE
Difference PCA by sklearn (SVD) and scratch PCA (Eigenvector Decomposition)
Difference PCA by sklearn (SVD) and scratch PCA (Eigenvector Decomposition) While implementing PCA from scratch, I discovered that PCA by sklearn uses Singular Value Decomposition (SVD) while all tutorials implement PCA using Eigenvalue Decomposition. They lead to different eigenvectors. In PCA by sklearn: self.mean_ ...
https://stackoverflow.com/questions/76067736/difference-pca-by-sklearn-svd-and-scratch-pca-eigenvector-decomposition
scikit-learn, data-analysis, pca, svd, eigenvector
1,682,019,999
se_76063229
stackoverflow
DATA_SCIENCE
Multiple data cursor with data tooltips on same x-axis with matplotlib or plotly
Multiple data cursor with data tooltips on same x-axis with matplotlib or plotly I am trying to plot and analyze the data using matplotlib library as well as plotly. The requirement is as below image (image is from a different app): Details of the plot shown in the image is as follows: X axis is time Multiple Y axis...
https://stackoverflow.com/questions/76063229/multiple-data-cursor-with-data-tooltips-on-same-x-axis-with-matplotlib-or-plotly
python, matplotlib, plotly, visualization, data-analysis
1,681,987,545
se_76051358
stackoverflow
DATA_SCIENCE
Accessing month data in pandas
Accessing month data in pandas My data looks like following; Month Target Efficiency Actual Aug-18 95% 0.4500 Sep-18 95% 0.3000 I'm running pandas. when i run code; df['Efficiency Actual'] I get correct output. But when i run; df['Month'] I get an error, KeyError: 'Month' How can this be fixed. kindly ...
https://stackoverflow.com/questions/76051358/accessing-month-data-in-pandas
python, pandas, data-analysis
1,681,885,808
se_76033011
stackoverflow
DATA_SCIENCE
How to do Descriptive Statistics in Qlik Sense
How to do Descriptive Statistics in Qlik Sense How to do Descriptive Statistics in Qlik Sense?  What I mean by Descriptive Statistics is to display Mean,  Standard Error, Median, Mode, Standard Deviation, Sample Variance, Kurtosis, Skewness, Range, Minimum, Maximum, Sum, Count in one table. This is really easy to do i...
https://stackoverflow.com/questions/76033011/how-to-do-descriptive-statistics-in-qlik-sense
statistics, data-analysis, qliksense
1,681,719,233
se_75345798
stackoverflow
DATA_SCIENCE
how to compare in R the first character of a date variable with a number
how to compare in R the first character of a date variable with a number I have a column called Start_date (type is date) and I want to check the first number of the entry and compare it to a number. I have achieved the result I want already using the following code: filter(tripRawData_cleaned, Start_date < "2022-01-0...
https://stackoverflow.com/questions/75345798/how-to-compare-in-r-the-first-character-of-a-date-variable-with-a-number
r, data-analysis
1,675,521,374
se_76038104
stackoverflow
DATA_SCIENCE
Problem with library for quick Wasserstein distance calculation
Problem with library for quick Wasserstein distance calculation I need a tool to quickly calculate the Wasserstein distance between two two-dimensional point sets. I have been using Gudhi, but it appears to be too slow, and I need a faster alternative. I found the geomloss library, which appears to be fast enough, but...
https://stackoverflow.com/questions/76038104/problem-with-library-for-quick-wasserstein-distance-calculation
python, pytorch, data-analysis
1,681,755,373
se_76041026
stackoverflow
DATA_SCIENCE
Why the new header isn&#39;t iterating (always print the same header), not the next header
Why the new header isn&#39;t iterating (always print the same header), not the next header This is my code def PhaseInterval(arrival_file, filter_file, header_file): # read the stations from the filter file with open(filter_file, 'r') as f: filter_stations = [line.strip() for line in f.readlines()] ...
https://stackoverflow.com/questions/76041026/why-the-new-header-isnt-iterating-always-print-the-same-header-not-the-next
python, data-analysis
1,681,790,675
se_76034038
stackoverflow
DATA_SCIENCE
Python function to identify 0 as a missing value in numerical columns of a dataframe
Python function to identify 0 as a missing value in numerical columns of a dataframe I need to write a function where zero in a numeric column is identified as missing value in python. Can anyone help me with how to do that? #numerical columns in df dataframe df_num = df.select_dtypes(exclude='object') After this I n...
https://stackoverflow.com/questions/76034038/python-function-to-identify-0-as-a-missing-value-in-numerical-columns-of-a-dataf
python, dataframe, data-analysis, missing-data, exploratory-data-analysis
1,681,726,435
se_76015925
stackoverflow
DATA_SCIENCE
Pandas pivot table with multiple columns and &quot;yes&quot; or &quot;no&quot; index
Pandas pivot table with multiple columns and &quot;yes&quot; or &quot;no&quot; index I've been doing analysis of this dataset https://www.kaggle.com/datasets/yasserh/housing-prices-dataset it contains columns ['mainroad', 'guestroom', 'basement', 'hotwaterheating', 'airconditioning', 'prefarea'] which all have values ...
https://stackoverflow.com/questions/76015925/pandas-pivot-table-with-multiple-columns-and-yes-or-no-index
python, pandas, data-analysis
1,681,480,967
se_76001954
stackoverflow
DATA_SCIENCE
Pandas: Changing the value of a column based on a string existing in the column
Pandas: Changing the value of a column based on a string existing in the column I have a list of movies and I want to change the value of the column to 0 if the string "Action" exists in the column or 1 if the string "Drama" exists. If both exists then change the value to 0 since the genre "Action" is more important. ...
https://stackoverflow.com/questions/76001954/pandas-changing-the-value-of-a-column-based-on-a-string-existing-in-the-column
python, pandas, dataframe, data-analysis
1,681,363,964
se_75999151
stackoverflow
DATA_SCIENCE
How do I continue a large project next day without R lagging/stalling reloading code from previous work?
How do I continue a large project next day without R lagging/stalling reloading code from previous work? I'm doing a project for class that involves 12 csv files which I joined into one mega csv, but the problem is that it's quite a large dataset that has 6million rows. Everyday I boot up Rstudio to reload the project...
https://stackoverflow.com/questions/75999151/how-do-i-continue-a-large-project-next-day-without-r-lagging-stalling-reloading
r, rstudio, data-analysis
1,681,327,942
se_75989806
stackoverflow
DATA_SCIENCE
How do I improve the speed of this program?
How do I improve the speed of this program? I am using Python and the pandas library and two csv files. A master file that contains all possible occurrences and a subset file that contains a portion of the master file. The files do contain identical column names but differ in row count. The subtest file has results in...
https://stackoverflow.com/questions/75989806/how-do-i-improve-the-speed-of-this-program
python, pandas, csv, data-analysis
1,681,243,995
se_65443850
stackoverflow
DATA_SCIENCE
Data Analysis with Pandas throws nothing
Data Analysis with Pandas throws nothing Write a function called proportion_of_education which returns the proportion of children in the dataset who had a mother with the education levels equal to less than high school (<12), high school (12), more than high school but not a college graduate (>12) and college degree. ...
https://stackoverflow.com/questions/65443850/data-analysis-with-pandas-throws-nothing
python, pandas, data-analysis
1,608,850,352
se_75992023
stackoverflow
DATA_SCIENCE
Find Continuous curves from arbitrary data using python
Find Continuous curves from arbitrary data using python I have this given set of data: snew = [0.0, 0.643, 0.173, -0.499, -0.939, -0.939, -0.866, -0.984, -0.642, 0.0] cnew = [1.0, 0.766, 0.984, 0.866, 0.342, -0.342, -0.866, 0.173, 0.766, 1.0] and when I plot them I get something like this - data = np.vstack((snew, c...
https://stackoverflow.com/questions/75992023/find-continuous-curves-from-arbitrary-data-using-python
python, sorting, plot, data-analysis, data-manipulation
1,681,275,421
se_75989272
stackoverflow
DATA_SCIENCE
How to Get the match value in a pandas column?
How to Get the match value in a pandas column? I would like to compare a list in a pandas column with another normal list and find the match value and put it in another column. I have a list of terms and would like to find whether there is a match for the particular word meta ['Home', 'grocery', 'cake'] ['Ho...
https://stackoverflow.com/questions/75989272/how-to-get-the-match-value-in-a-pandas-column
python, pandas, dataframe, numpy, data-analysis
1,681,239,509
se_75985032
stackoverflow
DATA_SCIENCE
IIterating a list to show duplicates and the deltas of those duplicates
IIterating a list to show duplicates and the deltas of those duplicates Learning python and pandas, not sure I still have the gray matter for this task but I find python programming to be fascinating. Wish I had started 60 years ago. The task I'm trying to accomplish is this. I have a list of random repeating numbers....
https://stackoverflow.com/questions/75985032/iiterating-a-list-to-show-duplicates-and-the-deltas-of-those-duplicates
pandas, list, data-analysis
1,681,210,117
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_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_75959804
stackoverflow
DATA_SCIENCE
How to repeat steps on similar files in R
How to repeat steps on similar files in R Currently, I'm working on a case study. My way is to look for changes between months of the past year. I have 12 files that include data for each month with names like: 202201-divvy-tripdata.csv for January 202202-divvy-tripdata.csv for February ... 202212-divvy-tripdata.csv ...
https://stackoverflow.com/questions/75959804/how-to-repeat-steps-on-similar-files-in-r
r, data-analysis
1,680,881,168
se_75966681
stackoverflow
DATA_SCIENCE
How do I use the images I&#39;m undecided between 2 labels in a classification?
How do I use the images I&#39;m undecided between 2 labels in a classification? I annotated a dataset by direction of person. The labels are right, left, fore, back. I can't be sure some of the images if belong the one label. For example, Which label should be choosen for the below images? Are these back or right? ...
https://stackoverflow.com/questions/75966681/how-do-i-use-the-images-im-undecided-between-2-labels-in-a-classification
label, classification, data-analysis
1,680,974,562
se_75951247
stackoverflow
DATA_SCIENCE
pandas cross table solution
pandas cross table solution Using this input Gender SQ2_1 SQ2_2 SQ2_3 M 1 2 3 F 1 NaN 3 F 1 2 3 F NaN 2 3 M 1 2 NaN M NaN 2 3 How can I achieve this output in pandas using either groupby, crosstab or pivot_table: Base M F All 6 3 3 SQ2_1 66 .0 66.0 66.0 SQ2_2 83 .0 100.0 66.0 SQ2_3...
https://stackoverflow.com/questions/75951247/pandas-cross-table-solution
python, pandas, data-analysis
1,680,794,994
se_75946133
stackoverflow
DATA_SCIENCE
Mutate in a group by taking mean of only the rows in the group that equal the selected row on another column
Mutate in a group by taking mean of only the rows in the group that equal the selected row on another column I'm running into an issue where I am grouping a data set by one variable (group) and want to take create a new output column that is the mean of the value column within each group AND with the added condition t...
https://stackoverflow.com/questions/75946133/mutate-in-a-group-by-taking-mean-of-only-the-rows-in-the-group-that-equal-the-se
r, dplyr, data-analysis, mean, mutate
1,680,758,969
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_75903233
stackoverflow
DATA_SCIENCE
How do I Extract mean from a summary() table in R?
How do I Extract mean from a summary() table in R? I've successfully created a table and summary of the data, but how can I extract the means from the table? (mean(VeryActiveminutes), mean(FairlyActiveMinutes), etc.). Is there something I can add to the summary function? totalTime <- Activity %>% select(VeryActiveM...
https://stackoverflow.com/questions/75903233/how-do-i-extract-mean-from-a-summary-table-in-r
r, data-analysis, mean, summary
1,680,302,150
se_75915992
stackoverflow
DATA_SCIENCE
Python/Pandas: How to slice a column into multiple sections at particular rows
Python/Pandas: How to slice a column into multiple sections at particular rows My laboratory instrument is providing a data set formatted in the following manner. For context, I have minimal experience with python. TTS Cycle 1 Wavelength (nm) Absorbance 100 12 200 23 300 17 400 14 TTS Cycle 2 Wavel...
https://stackoverflow.com/questions/75915992/python-pandas-how-to-slice-a-column-into-multiple-sections-at-particular-rows
python, pandas, data-analysis
1,680,495,187
se_75903695
stackoverflow
DATA_SCIENCE
Excel If Statement with Wildcards and Value Search
Excel If Statement with Wildcards and Value Search I have a bunch of data with flight arrival and departure times that I would like to categorize. For example, the data may say things like "On Time", "34 Minutes Early", "7 Minutes Late", etc. I would like to simply categorize if the flight was early, late or on time. ...
https://stackoverflow.com/questions/75903695/excel-if-statement-with-wildcards-and-value-search
excel, if-statement, wildcard, data-analysis
1,680,309,534
se_75904683
stackoverflow
DATA_SCIENCE
Returning the specific K transactions that result in the maximum profit
Returning the specific K transactions that result in the maximum profit This is a question derived from the problem of returning the maximum profit from a list of prices through k number of transactions. I would like to not just return the profit but a list with the transactions that result in the maximum profit. For ...
https://stackoverflow.com/questions/75904683/returning-the-specific-k-transactions-that-result-in-the-maximum-profit
python, data-analysis, finance
1,680,332,049
se_75906390
stackoverflow
DATA_SCIENCE
I want to get date when I find Extreme Fear after Extreme Greed
I want to get date when I find Extreme Fear after Extreme Greed I have 4 columns: timestamp in which I have date fear_greed in which fear and greed index value value_classification I have only two classes extreme fear and extreme greed close is price so I want to get the date in which first extreme fear comes also t...
https://stackoverflow.com/questions/75906390/i-want-to-get-date-when-i-find-extreme-fear-after-extreme-greed
python-3.x, pandas, dataframe, group-by, data-analysis
1,680,354,656
se_75895573
stackoverflow
DATA_SCIENCE
How can I supplement my data based on known data?
How can I supplement my data based on known data? I now have 2500 pieces of data. It is about the A/B/C/D properties of 2500 objects, I now want to supplement the E/F/G properties of these objects in this excel table, E/F/G can be searched on the Internet, but how to import this into excel in batches? Can I only searc...
https://stackoverflow.com/questions/75895573/how-can-i-supplement-my-data-based-on-known-data
python, excel, web-scraping, data-analysis
1,680,244,993
se_75870671
stackoverflow
DATA_SCIENCE
find the customers who have bought music from every genre in the list
find the customers who have bought music from every genre in the list How do I find the customers who have bought music from every genre in the list? enter image description here I am trying inner join and trying recursive statements. SELECT CONCAT(customer.first_name,' ',customer.last_name), genre.name FROM customer...
https://stackoverflow.com/questions/75870671/find-the-customers-who-have-bought-music-from-every-genre-in-the-list
sql, list, subquery, inner-join, data-analysis
1,680,034,384
se_75886847
stackoverflow
DATA_SCIENCE
Why does using df[[column_name]] dislays a DataFrame?
Why does using df[[column_name]] dislays a DataFrame? I was just asking myself: I understand that calling df[column_name] displays a Series because a DataFrame is built of different arrays. Though, why does calling df[[column_name]] (column_name being only one column) returns a DataFrame and not a Series ? I'm ont sur...
https://stackoverflow.com/questions/75886847/why-does-using-dfcolumn-name-dislays-a-dataframe
python, pandas, dataframe, numpy, data-analysis
1,680,170,989
se_75886073
stackoverflow
DATA_SCIENCE
How to replace missing data in a column with the daily average based on dates
How to replace missing data in a column with the daily average based on dates I have this dataframe: DATE PRCP 0 1949-01-01 25 1 1949-01-02 5 2 1949-01-03 0 3 1949-01-04 0 4 1949-01-05 0 ... ... ... 20952 2016-01-27 0 20953 2016-01-28 0 20954 2016-...
https://stackoverflow.com/questions/75886073/how-to-replace-missing-data-in-a-column-with-the-daily-average-based-on-dates
python, pandas, dataframe, numpy, data-analysis
1,680,166,457
se_75878308
stackoverflow
DATA_SCIENCE
Linear Programming Binary Variable Grouping
Linear Programming Binary Variable Grouping I am new to Linear Programming, tried few sample cases. Seeking help on solution/approach for below problem. I am not sure if it's linear programming or I should look in other options. Here I am trying to identify the designers with best cost to finish the complete dress. Th...
https://stackoverflow.com/questions/75878308/linear-programming-binary-variable-grouping
math, binary, data-analysis, linear-programming, optimathsat
1,680,098,709
se_75860478
stackoverflow
DATA_SCIENCE
How do i plot a single figure but with two boxplots?
How do i plot a single figure but with two boxplots? As my question says, I want to know how to plot two boxplots in a single figure. That's my actual code: plt.subplot(1, 2, 1) bplot2 = plt.boxplot(dff['totlngth'], vert = 1, patch_artist = True) for box in bplot2['boxes']: box.set(facecolor = 'pink') for median in ...
https://stackoverflow.com/questions/75860478/how-do-i-plot-a-single-figure-but-with-two-boxplots
python, pandas, matplotlib, data-analysis
1,679,952,175
se_75870641
stackoverflow
DATA_SCIENCE
Error in checkmvArgs(lower = lower, upper = upper, mean = delta, corr = corr, : ‘lower’ not specified or contains NA
Error in checkmvArgs(lower = lower, upper = upper, mean = delta, corr = corr, : ‘lower’ not specified or contains NA I am trying to use R to conduct pairwise comparisons while controlling the experiment-wise error rate at α = 0.05. I need the values Estimate, SE, and Test. Below is my code I am trying to run and the d...
https://stackoverflow.com/questions/75870641/error-in-checkmvargslower-lower-upper-upper-mean-delta-corr-corr
r, database, data-analysis, anova
1,680,034,197
se_57636540
stackoverflow
DATA_SCIENCE
How to preserve datatype of column while using to_csv()
How to preserve datatype of column while using to_csv() I'm changing int datatype to str datatype of a column using astype() and saving it to csv file using to_csv(). But reading the same csv file by read_csv() says the datatype is int only. I don't want to use dtype=str while reading the file. Below is the following...
https://stackoverflow.com/questions/57636540/how-to-preserve-datatype-of-column-while-using-to-csv
python, pandas, export-to-csv, data-analysis
1,566,637,671
se_75842832
stackoverflow
DATA_SCIENCE
Recieving IndexError when performing CategoricalNB() using SKLearn
Recieving IndexError when performing CategoricalNB() using SKLearn I am currently running into an index error when trying to perform a CategoricalNB using SKLearn. I am doing this for an assignment for my data class. I tried to implement some known fixes but none have worked. For context, here are the instructions I a...
https://stackoverflow.com/questions/75842832/recieving-indexerror-when-performing-categoricalnb-using-sklearn
python, scikit-learn, data-analysis, prediction, naivebayes
1,679,759,538
se_75848354
stackoverflow
DATA_SCIENCE
Properly using pd.Categorical Dtype in cases that contain multiple entries
Properly using pd.Categorical Dtype in cases that contain multiple entries Consider the following dataframe, (a snippet of the original): df = pd.DataFrame({ 'netflix_id': {1: 81197050, 2: 81213894, 3: 81082007}, 'title': {1: 'guatemala: heart of the mayan world',2: 'the zoya factor',3: 'atlan...
https://stackoverflow.com/questions/75848354/properly-using-pd-categorical-dtype-in-cases-that-contain-multiple-entries
python, pandas, dataframe, seaborn, data-analysis
1,679,841,446
se_75843046
stackoverflow
DATA_SCIENCE
Conversion of datetime format to float for regression
Conversion of datetime format to float for regression I need to predict temperature when time and humidity are given. Before starting in python, I created a regression model in excel. My data has time in datetime format [6/1/2022 0:00]. Instead of predicting temperature, it gives datetime as an answer. On looking up t...
https://stackoverflow.com/questions/75843046/conversion-of-datetime-format-to-float-for-regression
python, datetime, regression, data-analysis, python-datetime
1,679,761,710
se_75835090
stackoverflow
DATA_SCIENCE
Appending a named number vector to a matrix with more values
Appending a named number vector to a matrix with more values Im relatively new to R, and I just cant seem to find the solution to this problem, so sorry if this might be obvious or has been asked before. I have a large matrix, with named named rows. I filtered this data and performed a calculation with a subset of thi...
https://stackoverflow.com/questions/75835090/appending-a-named-number-vector-to-a-matrix-with-more-values
r, data-analysis
1,679,669,214
se_66914972
stackoverflow
DATA_SCIENCE
How do I dynamically update matplotlib plots in a tqdm-loop inside a Jupyter notebook?
How do I dynamically update matplotlib plots in a tqdm-loop inside a Jupyter notebook? How do I do something like: from tqdm.notebook import tqdm from matplotlib import pyplot as plt from IPython import display import time import numpy as np xx = list() for i in tqdm(range(500)): xx.append(i * 0.1) yy = np....
https://stackoverflow.com/questions/66914972/how-do-i-dynamically-update-matplotlib-plots-in-a-tqdm-loop-inside-a-jupyter-not
python, matplotlib, jupyter-notebook, data-analysis, tqdm
1,617,342,392
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_75816370
stackoverflow
DATA_SCIENCE
Failed to retrieve server version error in Visual Studio 2019 data connection
Failed to retrieve server version error in Visual Studio 2019 data connection While opening tables from server explorer data connection its showing the error: failed to retrieve server version and tables are not opening All compatibility are ok. How to solve this please help?
https://stackoverflow.com/questions/75816370/failed-to-retrieve-server-version-error-in-visual-studio-2019-data-connection
sql-server, visual-studio-2019, ssas, data-analysis, ssas-tabular
1,679,512,183
se_75808030
stackoverflow
DATA_SCIENCE
How to generate many new columns in pandas Dataframe in a convenient way?
How to generate many new columns in pandas Dataframe in a convenient way? Suppose I have a Dataframe df of many columns now, and I'm trying to generate a large number of variable. The naive way I think is df['new_var_1'] = df['var_1'] + df['var_2'] df['new_var_2'] = df['var_2'] / (df['var_3'] + df['var_4']) df['new_va...
https://stackoverflow.com/questions/75808030/how-to-generate-many-new-columns-in-pandas-dataframe-in-a-convenient-way
pandas, data-analysis
1,679,452,750
se_75545371
stackoverflow
DATA_SCIENCE
How to recover deleted orphaned assets in Quicksight?
How to recover deleted orphaned assets in Quicksight? As part of my Cleanup activity I have deleted the Quicksight user without transferring the ownership to another user and where deleted including all orphaned resources. Can you please help me recovery all the resources. Tried with Restoreanalysis as well but it doe...
https://stackoverflow.com/questions/75545371/how-to-recover-deleted-orphaned-assets-in-quicksight
amazon-web-services, cloud, data-analysis, amazon-quicksight, quicksight-embedding
1,677,158,233
se_75804243
stackoverflow
DATA_SCIENCE
Pandas dataframe get the last row by year
Pandas dataframe get the last row by year I need to filter the following dataframe to get only the last date from each year: A B C D E F G Date 2018-05-03 20.700001 ...
https://stackoverflow.com/questions/75804243/pandas-dataframe-get-the-last-row-by-year
python, pandas, dataframe, data-analysis
1,679,418,104
se_75799196
stackoverflow
DATA_SCIENCE
Convert comma to dot in notepad (Not every comma)
Convert comma to dot in notepad (Not every comma) I have a data which looks like 5,960464,6,65430376927058E-10,-91,7689743041992,-89,5235061645508,6,71407200919707E-05,0,00869479635485696 11,92093,5,23110578457515E-10,-92,8140640258789,-90,5685958862305,8,97218165598724E-05,0,011619072933792 17,88139,4,52214777469635E...
https://stackoverflow.com/questions/75799196/convert-comma-to-dot-in-notepad-not-every-comma
python, data-analysis, notepad
1,679,389,862
se_75799486
stackoverflow
DATA_SCIENCE
Matplotlib plot of 2D data
Matplotlib plot of 2D data I have data of shape (1125, 2058) that I want to make a 2D plot of. The x-axis corresponds to wavelengths and I have a numpy array called 'lam_gal' for it and the y-axis corresponds to radii r. My center (r=0) is at y=596, from this I calculate my radii as: y_vals = np.arange(1125) radii =np...
https://stackoverflow.com/questions/75799486/matplotlib-plot-of-2d-data
python, matplotlib, data-analysis, axis, figure
1,679,391,572
se_75790235
stackoverflow
DATA_SCIENCE
How do I make excel to recognize year values in the format YYYY as a year date and not see the values as numbers and convert it to a different year?
How do I make excel to recognize year values in the format YYYY as a year date and not see the values as numbers and convert it to a different year? I'm trying to convert a column which contains year values to a date type that excel will recognize. The column contains values such as 2004, 2018, 2014 etc. But excel rea...
https://stackoverflow.com/questions/75790235/how-do-i-make-excel-to-recognize-year-values-in-the-format-yyyy-as-a-year-date-a
excel, data-analysis
1,679,315,068
se_75792064
stackoverflow
DATA_SCIENCE
Sort dataframe columns value by close it to another column
Sort dataframe columns value by close it to another column I need the 'value' column of pandas dataframe to be sorted by how close it is to the 'target' value: +----------+---------+----------+ | company | value | target | |----------+---------+----------+ | A | 23.18 | 26.8879 | | B | 14.31 | ...
https://stackoverflow.com/questions/75792064/sort-dataframe-columns-value-by-close-it-to-another-column
python, pandas, dataframe, data-analysis
1,679,325,221
se_75779230
stackoverflow
DATA_SCIENCE
Find the smallest range that contains a given percentage of values
Find the smallest range that contains a given percentage of values I have a .csv file that contains file sizes. I need to find the interval from a to b, where the majority of the files (75-80-85-90%) are, while [a,b] is the minimal interval possible. I am using python. I know how to do that if I’m checking the specifi...
https://stackoverflow.com/questions/75779230/find-the-smallest-range-that-contains-a-given-percentage-of-values
python, data-analysis, maximize
1,679,181,501
se_75369896
stackoverflow
DATA_SCIENCE
Using R tidyverse I got This error on the filter Error in filter(ToothGrowth, dose == 0.5) : object &#39;dose&#39; not found and I cant find a solution
Using R tidyverse I got This error on the filter Error in filter(ToothGrowth, dose == 0.5) : object &#39;dose&#39; not found and I cant find a solution Im learning R and using aprefunded database "ToothGrowth"Im learning to use Tidyverse and I have this block data("ToothGrowth") View(ToothGrowt) #will add name to the ...
https://stackoverflow.com/questions/75369896/using-r-tidyverse-i-got-this-error-on-the-filter-error-in-filtertoothgrowth-do
r, dplyr, tidyverse, data-analysis
1,675,753,543
se_75771074
stackoverflow
DATA_SCIENCE
Check if a record exist in previous month ONLY in SQL
Check if a record exist in previous month ONLY in SQL I am working on a project to classify customers as 'existing' or 'new' in MS SQL server. The rule for determining is to check the customer was with the company LAST month. Sample format below: The expected result below: enter image description here Customer A is a...
https://stackoverflow.com/questions/75771074/check-if-a-record-exist-in-previous-month-only-in-sql
sql, sql-server, datatable, sql-server-2012, data-analysis
1,679,078,294
se_75747384
stackoverflow
DATA_SCIENCE
LOOKUP in excel showing #N/A for the next year date
LOOKUP in excel showing #N/A for the next year date I have month-wise cumulative data. Now i am trying to LOOKUP the month value then divide with number of days according to the dates. Here when the date of the year changes I am getting #N/A error. Please guide me. Thanks. formula I used was: =LOOKUP(MONTH(B6),MONTH(...
https://stackoverflow.com/questions/75747384/lookup-in-excel-showing-n-a-for-the-next-year-date
excel, office365, ms-office, data-analysis, lookup
1,678,897,035
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_75721436
stackoverflow
DATA_SCIENCE
create a variable based on ordered and grouped values of two other columns in R
create a variable based on ordered and grouped values of two other columns in R I have a table like the following one in R : team tournament pool year sets ratio points ratio team 1 tournament 1 a 2011 3.00 0.89 team 2 tournament 1 a 2011 1.00 1.57 team 3 tournament 1 a 2011 1.50 1.11 team 4 tournament 1...
https://stackoverflow.com/questions/75721436/create-a-variable-based-on-ordered-and-grouped-values-of-two-other-columns-in-r
r, dplyr, group-by, data-analysis
1,678,707,881
se_75730834
stackoverflow
DATA_SCIENCE
How to retrieve previous two groups using sql
How to retrieve previous two groups using sql I would like to find out 21-jan-2022 belongs to which group and prior to that group if there are any groups present, pull last 2 groups and the date range. In this example : 21-Jan-22 falls under G4, so we need to pull out date range of G2 and G3 I am stuck figuring out ho...
https://stackoverflow.com/questions/75730834/how-to-retrieve-previous-two-groups-using-sql
sql, oracle-database, data-analysis
1,678,783,673
se_75099112
stackoverflow
DATA_SCIENCE
Orscoreci R function question, confidence interval for odds ratio
Orscoreci R function question, confidence interval for odds ratio I was given the next exercise: In a Retrospective case-control study we measure the Association between lung cancer and smoking. 709 cases and 709 controls were selected, and the exposition was measured as a binary whether the subject ever was a smoker....
https://stackoverflow.com/questions/75099112/orscoreci-r-function-question-confidence-interval-for-odds-ratio
r, statistics, data-analysis, confidence-interval
1,673,539,298
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_75645530
stackoverflow
DATA_SCIENCE
calculate average session duration depending on its number (duration of the first session, the second and so on)
calculate average session duration depending on its number (duration of the first session, the second and so on) id session server_time event level event_duration 1 h45jdnvj 2022-02-05 12:01:31 level_started 1 0 1 h45jdnvj 2022-02-05 12:01:36 level_completed 1 36 1 h45jdnvj 2022-02-05 12:02:06 level_started 2 ...
https://stackoverflow.com/questions/75645530/calculate-average-session-duration-depending-on-its-number-duration-of-the-firs
sql, database, data-analysis
1,678,052,537
se_75685586
stackoverflow
DATA_SCIENCE
I want to point my custom created color palette to default color palette in Tableau
I want to point my custom created color palette to default color palette in Tableau When I open the workbook and create the new sheet then the color palette which is assign to the Automatic is generate automatically. Now I have created the custom color palette using the preferences folder. Now I have to assign this ne...
https://stackoverflow.com/questions/75685586/i-want-to-point-my-custom-created-color-palette-to-default-color-palette-in-tabl
database, tableau-api, data-analysis, extension-methods, tableau-desktop
1,678,370,201
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_75711954
stackoverflow
DATA_SCIENCE
Best way to visualize this data?
Best way to visualize this data? I have 3 dataset that looks something like this but with around 600 records. [440.2, 441.5, 440.9, 441.8, 441.1 ..............] [722.3, 722.8, 722.1, 723.0, 722.7 ..............] [817.2, 817.6, 818.0, 817.5, 817.9 ..............] The values within the dataset are very close to each o...
https://stackoverflow.com/questions/75711954/best-way-to-visualize-this-data
python, matplotlib, data-analysis
1,678,610,475
se_75702938
stackoverflow
DATA_SCIENCE
How to convert coordinates or addresses to ISO 3166 codes
How to convert coordinates or addresses to ISO 3166 codes while trying to analyse some data i ran into a problem where i am supposed to convert some locations to their iso3166 equivalence so as to make a need Choropleth map of the data but converting the data has seem to be a hassle sorry that i have not shown my tria...
https://stackoverflow.com/questions/75702938/how-to-convert-coordinates-or-addresses-to-iso-3166-codes
python, pandas, data-analysis, choropleth, iso-3166
1,678,511,819
se_75629049
stackoverflow
DATA_SCIENCE
how to add the two split columns on a position where you want in dataset
how to add the two split columns on a position where you want in dataset import pandas as pd df[["First Name", "Last Name"]] = df["Full Name"].str.split(' ', 1, expand=True) enter image description here as you see in this image that it add the split columns at the end of the dataset and i want them to be at same posit...
https://stackoverflow.com/questions/75629049/how-to-add-the-two-split-columns-on-a-position-where-you-want-in-dataset
pandas, dataset, data-analysis, data-cleaning
1,677,857,629
se_75690419
stackoverflow
DATA_SCIENCE
popularity of guns depending on the level
popularity of guns depending on the level id level gun_name 1 1 xxxx 3 1 xxxx 2 1 yyyy 3 2 zzzz 1 2 zzzz 2 2 xxxx should display a table: level popular_gun_name 1 xxxx 2 zzzz I am new to sql please help
https://stackoverflow.com/questions/75690419/popularity-of-guns-depending-on-the-level
sql, database, data-analysis
1,678,398,940
se_75686334
stackoverflow
DATA_SCIENCE
Pandas Bar Graph not showing accurate distribution
Pandas Bar Graph not showing accurate distribution I have a dataset for monthly sales data that I want to determine the best month for sales using bar graph. The months was indicated using month number on the csv and I have successfully convert the numbers to month name. I applied groupby function to determine the bes...
https://stackoverflow.com/questions/75686334/pandas-bar-graph-not-showing-accurate-distribution
python, pandas, matplotlib, visualization, data-analysis
1,678,373,972