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_73272911
stackoverflow
DATA_SCIENCE
lux-api package installation python
lux-api package installation python I am trying to install lux-api package to do EDA. I am getting the below error I tried upgrading pip and setuptools as was suggested elsewhere but still get the same error
https://stackoverflow.com/questions/73272911/lux-api-package-installation-python
python, data-analysis
1,659,932,653
se_75173192
stackoverflow
DATA_SCIENCE
How transpose and transform portion of dataframe?
How transpose and transform portion of dataframe? beginner here. I have a dataframe like this: df<-data.frame(Country=c("USA","USA","USA","USA","India","India","India","India","China","China","China","China"), Indicator=rep(c("Population","GDP","Debt","Currency"),times=3),`2011`=rep(c(1,2,3,4),each=3),`...
https://stackoverflow.com/questions/75173192/how-transpose-and-transform-portion-of-dataframe
r, dataframe, data-analysis, transformation, transpose
1,674,135,906
se_75137854
stackoverflow
DATA_SCIENCE
Excel index match plus search
Excel index match plus search I have 4 columns column A is the range for lookup Column B is set of strings per cell in A column C is the lookup value of the columnA column D is a sentence that may/may not contain the string in column B. I need to find first if C is in Column A and if found, i need to check if the va...
https://stackoverflow.com/questions/75137854/excel-index-match-plus-search
excel, indexing, excel-formula, data-analysis
1,673,891,206
se_75164067
stackoverflow
DATA_SCIENCE
SQLite: How to select 10 values for each item
SQLite: How to select 10 values for each item I'm trying to select only 10 values in ASC order for each symbol in my list. Currently I have a query that will select all values : #syms list will change every time new data is ingested and processed... So I have it static here for reference... syms = "'O:SPY230118P003...
https://stackoverflow.com/questions/75164067/sqlite-how-to-select-10-values-for-each-item
python, sqlite, data-science, data-analysis
1,674,068,465
se_75158744
stackoverflow
DATA_SCIENCE
In DAX how could i calculate top 5 and others sum with percentage
In DAX how could i calculate top 5 and others sum with percentage I have a table which incluede firms name and cities i want to calculate percectage of top 5 cities and sum of other cities my expectatiton is: city firms % ny 25 ca 20 fl 15 az 12 others 28
https://stackoverflow.com/questions/75158744/in-dax-how-could-i-calculate-top-5-and-others-sum-with-percentage
powerbi, dax, data-analysis
1,674,042,274
se_75156969
stackoverflow
DATA_SCIENCE
World Cloud with two-word terms?
World Cloud with two-word terms? I am trying to create a wordcloud for my internship and I'm struggling with it, i would appreciate any help! I have a repository of 200 pdf documents, and I have to build a wordcloud of the terms that are repeated the most. For that, I build a corpus, turn it into a tdm, and use the co...
https://stackoverflow.com/questions/75156969/world-cloud-with-two-word-terms
r, data-analysis, text-mining, word-cloud, corpus
1,674,033,711
se_75154914
stackoverflow
DATA_SCIENCE
Why Isn&#39;t the variable incrementing
Why Isn&#39;t the variable incrementing I am trying to analyze data in a csv file using java. According to the data the variable numberPoistive should increment but it is not. I checked the String inside the e.equals method and it exactly matches the one in the data file. Does anybody have any idea what the mistake is...
https://stackoverflow.com/questions/75154914/why-isnt-the-variable-incrementing
java, data-analysis
1,674,018,564
se_74774243
stackoverflow
DATA_SCIENCE
Converting a text file with both numbers and characters into numpy arrays and list of strings
Converting a text file with both numbers and characters into numpy arrays and list of strings This seems to be so easy but I cannot solve it and none of the questions no answers I found here are useful for this case. I have a text file that has valies like this: -4.040 -75.444 8156.648 1.00 ABC2512 -4.036 ...
https://stackoverflow.com/questions/74774243/converting-a-text-file-with-both-numbers-and-characters-into-numpy-arrays-and-li
python, list, dataframe, numpy, data-analysis
1,670,862,477
se_75120319
stackoverflow
DATA_SCIENCE
Copy and paste data from multiple workbooks located in the same folder to several worksheets of a pre-existing workbook
Copy and paste data from multiple workbooks located in the same folder to several worksheets of a pre-existing workbook Please, I am wondering if I can get some help with a VBA code which can perform the following actions: Copy and paste data from multiple workbooks located in the same folder to several worksheets of ...
https://stackoverflow.com/questions/75120319/copy-and-paste-data-from-multiple-workbooks-located-in-the-same-folder-to-severa
excel, vba, data-analysis
1,673,720,761
se_75147965
stackoverflow
DATA_SCIENCE
How to select data from dataset for the given condition using time series in pandas
How to select data from dataset for the given condition using time series in pandas Patient_id timestamp date time blood_sugar 0 pid11928 1.670000e+12 30-12-22 16:53:20 100 1 pid11928 1.600000e+12 05-10-20 12:46:40 98 2 pid11928 1.580000e+12 10-03-20 3:13:20 ...
https://stackoverflow.com/questions/75147965/how-to-select-data-from-dataset-for-the-given-condition-using-time-series-in-pan
python, pandas, dataframe, data-science, data-analysis
1,673,965,913
se_75139346
stackoverflow
DATA_SCIENCE
Parsing an irregular .dat file in Python
Parsing an irregular .dat file in Python I have a .dat file of coordinates (x,y and z), separated by a marker (an integer). Here's a snippet of it: 500 0.14166 0.09077 0 0.11918 0.08461 0 0.09838 0.07771 0 0.07937 0.07022 0 0.06223 0.06222 0 0.04705 0.05386 0 0.03388 ...
https://stackoverflow.com/questions/75139346/parsing-an-irregular-dat-file-in-python
python, data-analysis
1,673,900,863
se_75137593
stackoverflow
DATA_SCIENCE
How to change all data types to date for a column with multiple data types?
How to change all data types to date for a column with multiple data types? How can I change the data type of fields in a column to date type if the data types are as below: <class 'datetime.datetime'> 296 <class 'str'> 116 <class 'float'> 8 My aim is ignore the empty rows, duplic...
https://stackoverflow.com/questions/75137593/how-to-change-all-data-types-to-date-for-a-column-with-multiple-data-types
python, pandas, dataframe, data-analysis
1,673,889,641
se_70994916
stackoverflow
DATA_SCIENCE
hvplot points with geo true does not show the map
hvplot points with geo true does not show the map all_neighborhoods_df.hvplot.points('Lon', 'Lat', geo=True, color="gross_rent", size="sale_price_sqr_foot", frame_height=500, frame_width=700, title="Neighborhood Map") When I looked through the documentat...
https://stackoverflow.com/questions/70994916/hvplot-points-with-geo-true-does-not-show-the-map
python, pandas, data-analysis, geo, hvplot
1,644,029,301
se_75108952
stackoverflow
DATA_SCIENCE
Converting Matplotlib axis to log only updates labels and not step spacing
Converting Matplotlib axis to log only updates labels and not step spacing I am trying to scale the space on the vertical axis here so it is spaced logarithmically. After searching the internet the proposed solution was ax.set_zscale('log') After trying that you can see the result below that only the labels where cha...
https://stackoverflow.com/questions/75108952/converting-matplotlib-axis-to-log-only-updates-labels-and-not-step-spacing
python, matplotlib, data-analysis
1,673,611,426
se_75125506
stackoverflow
DATA_SCIENCE
Sharing of Power BI work to external users
Sharing of Power BI work to external users I created a dashboard in Power BI and would like to share the work with my friends through my novypro profile. But in novypro, it asked me for the embedded url. As I am currently using my school mail id for all my Power BI works, I couldn't see the publish to web option in or...
https://stackoverflow.com/questions/75125506/sharing-of-power-bi-work-to-external-users
powerbi, data-analysis, powerbi-desktop, powerbi-embedded
1,673,790,255
se_49572416
stackoverflow
DATA_SCIENCE
R: convert to factor with order of levels same with case_when
R: convert to factor with order of levels same with case_when When doing data analysis, I sometimes need to recode values to factors in order to carry out groups analysis. I want to keep the order of factor same as the order of conversion specified in case_when. In this case, the order should be "Excellent" "Good" "...
https://stackoverflow.com/questions/49572416/r-convert-to-factor-with-order-of-levels-same-with-case-when
r, dplyr, data-analysis, tidyverse, forcats
1,522,404,332
se_75108948
stackoverflow
DATA_SCIENCE
Bigquery Sql not giving the expected result
Bigquery Sql not giving the expected result it keeps bringing this statement 'SELECT list expression references column stn which is neither grouped nor aggregated' This is the query SELECT stn, date, AVG(TEMP), FROM 'bigquery-public-data.noaa_gsod.gsod2020' WHERE stn="725030" OR stn="744860" AND date BETWEEN'2020-7-1'...
https://stackoverflow.com/questions/75108948/bigquery-sql-not-giving-the-expected-result
database, google-bigquery, visualization, data-analysis, data-anomalies
1,673,611,421
se_75082832
stackoverflow
DATA_SCIENCE
How to do python loop with if/then statement?
How to do python loop with if/then statement? I'm using Pandas in Jupyter notebook to compute the following from dataset structure below which contains duplicates by the column 'product'. | name | val_id |val_amt | our_val_amt | val_against | product | **NEW FIELD** | compx | xx1 | 530 | 424 | 418 ...
https://stackoverflow.com/questions/75082832/how-to-do-python-loop-with-if-then-statement
python, pandas, dataframe, jupyter-notebook, data-analysis
1,673,438,978
se_75092101
stackoverflow
DATA_SCIENCE
Showing the value corresponding to the biggest date per date group in Pivot Table in Excel
Showing the value corresponding to the biggest date per date group in Pivot Table in Excel Edit: This is my first question so I can't yet embed images. Consider a very simple dataset that has a Date column and a Value column. The Value column can be a numeric measurement of any kind. Screenshot of a simple Excel table...
https://stackoverflow.com/questions/75092101/showing-the-value-corresponding-to-the-biggest-date-per-date-group-in-pivot-tabl
excel, pivot-table, data-analysis, summarization
1,673,502,646
se_75100915
stackoverflow
DATA_SCIENCE
Categorize birth-death data in epochs
Categorize birth-death data in epochs I have data regarding the years of birth and death of several people. I want to compute efficiently how many people are in each of a group of pre-defined epochs. For example. If I have this list of data: Paul 1920-1950 Sara 1930-1950 Mark 1960-2020 Lennard 1960-1970 and I define...
https://stackoverflow.com/questions/75100915/categorize-birth-death-data-in-epochs
python, data-analysis
1,673,548,725
se_75082022
stackoverflow
DATA_SCIENCE
Merging dataframes where the common column has repeating values
Merging dataframes where the common column has repeating values I would like to merge several sensor files which have a common column as "date" whose value is the time the sensor data was logged in. These sensors log the data every second. My task is to join these sensor data into one big dataframe. Since there could ...
https://stackoverflow.com/questions/75082022/merging-dataframes-where-the-common-column-has-repeating-values
python, pandas, dataframe, data-analysis, eda
1,673,434,979
se_75066974
stackoverflow
DATA_SCIENCE
Top 10 Genre in SQL
Top 10 Genre in SQL I am trying to get the top 10 Genres from the IMDB Movies database (CSV format). Normally it is an easy task all you have to do is group and count. But in this database genre is given in quite a weird format. Eg: Action|Adventure|Fantasy|Sci-Fi I have tried counting using like function but with thi...
https://stackoverflow.com/questions/75066974/top-10-genre-in-sql
mysql-workbench, data-analysis, imdb
1,673,337,327
se_75088483
stackoverflow
DATA_SCIENCE
How to control the output of groupby in pandas to show the whole row not a single column
How to control the output of groupby in pandas to show the whole row not a single column this is a sample my dataframe(seasonal_name): season winner count team_api_id team_long_name 1 2008/2009 10260 28 10260.0 Manchester United 2 2008/2009 8634 27 8634.0 FC Barcelona 3 2008/2009 8548 26...
https://stackoverflow.com/questions/75088483/how-to-control-the-output-of-groupby-in-pandas-to-show-the-whole-row-not-a-singl
python, pandas, dataframe, group-by, data-analysis
1,673,467,581
se_33814090
stackoverflow
DATA_SCIENCE
How to deal with small AND unbalanced datasets for machine learning classification problems
How to deal with small AND unbalanced datasets for machine learning classification problems I am dealing with a very challenging classification problem where I have three problems: A small dataset (about 800 samples), unbalanced dataset (4 classes where 1 - 600 samples, 2/3/4 - 50 samples each) and missing data in one...
https://stackoverflow.com/questions/33814090/how-to-deal-with-small-and-unbalanced-datasets-for-machine-learning-classificati
machine-learning, classification, data-analysis
1,447,966,104
se_75043415
stackoverflow
DATA_SCIENCE
How can I add a new column to a dataframe (df1) that is the sum of multiple lookup values from df1 in another dataframe (df2)
How can I add a new column to a dataframe (df1) that is the sum of multiple lookup values from df1 in another dataframe (df2) Say I have 2 dataframes: df1 id guid name item1 item2 item3 item4 item5 item6 item7 item8 item9 0 303195812...
https://stackoverflow.com/questions/75043415/how-can-i-add-a-new-column-to-a-dataframe-df1-that-is-the-sum-of-multiple-look
python, pandas, numpy, data-science, data-analysis
1,673,121,804
se_75073143
stackoverflow
DATA_SCIENCE
Handling infinite values in returned JSON in AWS Lambda Python function
Handling infinite values in returned JSON in AWS Lambda Python function I have a Lambda function which calls a Python script, which in turn gives results in json format. There is a possibility for the results of the script to tend to infinity, and we end up with "inf" values in the json. When this happens, the script ...
https://stackoverflow.com/questions/75073143/handling-infinite-values-in-returned-json-in-aws-lambda-python-function
python, json, amazon-web-services, aws-lambda, data-analysis
1,673,368,727
se_75061608
stackoverflow
DATA_SCIENCE
Callinga column but error not exists even though column exists in the df
Callinga column but error not exists even though column exists in the df I am trying to plot a line graph with respect to years . I am calling the column from the dataframe but it can't see it i dont know why even though you will find in the screenshot that the column exists in the dataframe Here i printed the df colu...
https://stackoverflow.com/questions/75061608/callinga-column-but-error-not-exists-even-though-column-exists-in-the-df
python, pandas, dataframe, apache-spark-sql, data-analysis
1,673,289,384
se_75061786
stackoverflow
DATA_SCIENCE
How to show the yaxis&#39; limit greater than the data&#39;s extreme value
How to show the yaxis&#39; limit greater than the data&#39;s extreme value Let's say I wish to compare the performance of bubble sort and selection sort and I have the time taken for the code to run for different number of inputs. The graph for each came out as follows. The Bubble sort: n=[] for i in range(13): n....
https://stackoverflow.com/questions/75061786/how-to-show-the-yaxis-limit-greater-than-the-datas-extreme-value
python, matplotlib, data-science, visualization, data-analysis
1,673,290,528
se_75054232
stackoverflow
DATA_SCIENCE
How do i get pie chart labels to line up with the correct values from dataframe?
How do i get pie chart labels to line up with the correct values from dataframe? My pie chart is coming out okay, the segments are the correct sizes, but the labels aren't on the correct places. # declaring exploding pie explode = [0, 0.1, 0, 0, 0,0] # define Seaborn color palette to use palette_color = sns.color_pale...
https://stackoverflow.com/questions/75054232/how-do-i-get-pie-chart-labels-to-line-up-with-the-correct-values-from-dataframe
python, pandas, dataframe, matplotlib, data-analysis
1,673,249,329
se_75053098
stackoverflow
DATA_SCIENCE
Group by Problem in Touchpoint Table Creation (SQL)
Group by Problem in Touchpoint Table Creation (SQL) I am working on a SQL query in the Azure Databricks environment that has the following dataset: CREATE OR REPLACE TABLE touchpoints_table ( List STRING, Path_Lenght INT ); INSERT INTO touchpoints_table VALUES ('BBB, AAA, CCC', 3), ('BBB', 1), ('DDD, AAA...
https://stackoverflow.com/questions/75053098/group-by-problem-in-touchpoint-table-creation-sql
sql, dataframe, data-analysis, data-manipulation, databricks-sql
1,673,237,202
se_75051599
stackoverflow
DATA_SCIENCE
How to Create a Touchpoint Table from a list
How to Create a Touchpoint Table from a list I am working on a SQL query in the Azure Databricks environment that has the following dataset: CREATE OR REPLACE TABLE touchpoints_table ( List STRING, Path_Lenght INT ); INSERT INTO touchpoints_table VALUES ('BBB, AAA, CCC', 3), ('BBB', 1), ('DDD, AAA', 2), ...
https://stackoverflow.com/questions/75051599/how-to-create-a-touchpoint-table-from-a-list
sql, dataframe, data-analysis, data-manipulation, databricks-sql
1,673,215,474
se_75001849
stackoverflow
DATA_SCIENCE
Construct file path using for loop
Construct file path using for loop I am trying to write a function that reads an array of parquet files as dataframe and concatenate them sequentially as on file # Get the list of all files and directories path = "C:**********\\main_data_1" dir_list = os.listdir(path) dir_list Total_df = [] all_ais_msg_df = [] for j i...
https://stackoverflow.com/questions/75001849/construct-file-path-using-for-loop
python, dataframe, for-loop, data-analysis, string-concatenation
1,672,815,129
se_75048372
stackoverflow
DATA_SCIENCE
How to find the remainder of an AND operation on two sets in python
How to find the remainder of an AND operation on two sets in python I have two sets of countries, one of which is longer, and I'm trying to find the entries that don't feature in both lists. (set(a) & set(b) this code gave me the entries that appear in both. Not(set(a) & set(b)) just returned false. I'm looking for a ...
https://stackoverflow.com/questions/75048372/how-to-find-the-remainder-of-an-and-operation-on-two-sets-in-python
python, pandas, dataframe, data-analysis
1,673,186,677
se_75020180
stackoverflow
DATA_SCIENCE
Is there a way to change an event action name in Google Analytics 3?
Is there a way to change an event action name in Google Analytics 3? I'm trying to change the event actions name in Google Aalytics 3, is there a way to do this? For example change from "25" to "25%" and from "play" to "Play".
https://stackoverflow.com/questions/75020180/is-there-a-way-to-change-an-event-action-name-in-google-analytics-3
google-analytics, google-tag-manager, data-analysis
1,672,929,882
se_75038582
stackoverflow
DATA_SCIENCE
How to replace Null values in dataframe with condition based on other columns?
How to replace Null values in dataframe with condition based on other columns? I have a dataframe where Income column have missing values, and I want to replace these missing values with the average of the income based on their education type. I have already calculated the average income according to education level, ...
https://stackoverflow.com/questions/75038582/how-to-replace-null-values-in-dataframe-with-condition-based-on-other-columns
python, pandas, data-analysis
1,673,074,113
se_75035893
stackoverflow
DATA_SCIENCE
machine learning python train eror
machine learning python train eror I am using train commands while doing bitcoin data analysis and I encountered an error : data = df.set_index('Date') dataset = df.values training_data_len = math.ceil(len(dataset) * .8) scaler = MinMaxScaler(feature_range=(0,1)) scaled_data = scaler.fit_transform(dataset) train_d...
https://stackoverflow.com/questions/75035893/machine-learning-python-train-eror
python, machine-learning, data-analysis
1,673,037,593
se_72070227
stackoverflow
DATA_SCIENCE
How to clean a column with mixed variables like curreny in char format, blanks, strings in R
How to clean a column with mixed variables like curreny in char format, blanks, strings in R I have a dataset of startups, in which I have a column called "Amount" which is nothing but the valuations of each startup. when I tried to plot, the plot came out ugly and I found that those were in "char" format but when I t...
https://stackoverflow.com/questions/72070227/how-to-clean-a-column-with-mixed-variables-like-curreny-in-char-format-blanks
r, data-analysis, exploratory-data-analysis
1,651,336,139
se_74997589
stackoverflow
DATA_SCIENCE
How to use svydesign data object in R for NESARC-III data OR apply survey weights in SPSS?
How to use svydesign data object in R for NESARC-III data OR apply survey weights in SPSS? I am using a large national dataset for the first time, specifically a subset of the NESARC-III (N=26960). I have the data in SPSS because I used that software to clean it (creating variables, defining missings, etc.)simply beca...
https://stackoverflow.com/questions/74997589/how-to-use-svydesign-data-object-in-r-for-nesarc-iii-data-or-apply-survey-weight
r, data-analysis, spss, survey, weighting
1,672,772,233
se_75015260
stackoverflow
DATA_SCIENCE
Augmented Dickey Fuller test: p-value is a nan
Augmented Dickey Fuller test: p-value is a nan I am trying to predict some time series and would like to check stationarity using the p-value of the augmented Dickey-Fuller test: from statsmodels.tsa.stattools import adfuller df = pd.read_csv(path) adfuller(df['values']) With a working example, the following is print...
https://stackoverflow.com/questions/75015260/augmented-dickey-fuller-test-p-value-is-a-nan
python, data-analysis, statsmodels
1,672,904,953
se_75004205
stackoverflow
DATA_SCIENCE
Syncing incremental data with ADF
Syncing incremental data with ADF In Synapse I've setup 3 different pipelines. They all gather data from different sources (SQL, REST and CSV) and sink this to the same SQL database. Currently they all run during the night, but I already know that the question is coming of running it more frequently. I want to prevent...
https://stackoverflow.com/questions/75004205/syncing-incremental-data-with-adf
azure, azure-data-factory, etl, data-analysis, azure-synapse
1,672,828,787
se_75008233
stackoverflow
DATA_SCIENCE
I m trying to do an apply function over a column in my dataframe, trying to divide the entries in the column Price by 100 using lambda function
I m trying to do an apply function over a column in my dataframe, trying to divide the entries in the column Price by 100 using lambda function car_data["Price"]= car_data["Price"].apply(lambda x:x/100)) ^ SyntaxError: invalid syntax car_data["Price"].dtype dtype(...
https://stackoverflow.com/questions/75008233/i-m-trying-to-do-an-apply-function-over-a-column-in-my-dataframe-trying-to-divi
python, pandas, dataframe, lambda, data-analysis
1,672,848,919
se_75000762
stackoverflow
DATA_SCIENCE
How to do a if then statement in conjunction with a group by sum operator in Python/Pandas?
How to do a if then statement in conjunction with a group by sum operator in Python/Pandas? I'm pretty new to Python/Pandas with a majority of my experience being in SQL/SAS. Unfortunately i'm using an old version of Jupyter notebook which doesn't allow me to install the sql package at work.. well without luck current...
https://stackoverflow.com/questions/75000762/how-to-do-a-if-then-statement-in-conjunction-with-a-group-by-sum-operator-in-pyt
python, pandas, dataframe, analytics, data-analysis
1,672,803,892
se_50742449
stackoverflow
DATA_SCIENCE
Edit text in PDF with python
Edit text in PDF with python I have a pdf file and I need to edit some text/values in the pdf. For example, In the pdf files that I have BIRTHDAY DD/MM/YYYY is always N/A. I want to change it to whatever value I desire and then save it as a new document. Overwriting existing document is also alright. I have previously...
https://stackoverflow.com/questions/50742449/edit-text-in-pdf-with-python
python, data-analysis, pypdf
1,528,377,926
se_74995705
stackoverflow
DATA_SCIENCE
What is window_size in time-series and What are the advantages and disadvantages of having small and large window_size?
What is window_size in time-series and What are the advantages and disadvantages of having small and large window_size? I am quite beginner in machine learning. I have tried a lot to understand this concept but I am unable to understand it on google. I need to understand this concept in easy way. Please explain this q...
https://stackoverflow.com/questions/74995705/what-is-window-size-in-time-series-and-what-are-the-advantages-and-disadvantages
python, machine-learning, jupyter, data-analysis, stumpy
1,672,761,577
se_74993084
stackoverflow
DATA_SCIENCE
How to Select dates when i sold nothing?
How to Select dates when i sold nothing? Assume i have a table of item_sold from 01-01-2020 to 01-01-2023 with columns product_id, product_name, quantity and date. I want to get all the dates when i sold nothing. I am using Postgresql, please help me in this problem. I tried withclaue and many other things but they di...
https://stackoverflow.com/questions/74993084/how-to-select-dates-when-i-sold-nothing
sql, postgresql, data-analysis
1,672,747,223
se_74992173
stackoverflow
DATA_SCIENCE
List of rows with all the possible combinations of answers from a questionnaire
List of rows with all the possible combinations of answers from a questionnaire I need to create a list of rows with all the possible combinations of answers from a questionnaire. I'm using Jupyter Notebook with Python code. There are around 40 questions and some of them have only 3 answer options to choose from, and ...
https://stackoverflow.com/questions/74992173/list-of-rows-with-all-the-possible-combinations-of-answers-from-a-questionnaire
python, excel, list, combinations, data-analysis
1,672,742,197
se_74990947
stackoverflow
DATA_SCIENCE
How to apply multiple conditions in a dataframe
How to apply multiple conditions in a dataframe I do have an issue while applying a condition and then applying a value to that particular values. I'm new to this just practicing with dataset. My question is I need to apply a bonus mark to those students who have secured above 77 marks for 'math'. Any suggestion would...
https://stackoverflow.com/questions/74990947/how-to-apply-multiple-conditions-in-a-dataframe
python, data-science, data-analysis, exploratory-data-analysis
1,672,735,599
se_74990355
stackoverflow
DATA_SCIENCE
ValueError: Image size of 154660x122 pixels is too large. It must be less than 2^16 in each direction. I am trying to make timeline and getting error
ValueError: Image size of 154660x122 pixels is too large. It must be less than 2^16 in each direction. I am trying to make timeline and getting error fig, ax = plt.subplots(figsize=(1, 1), constrained_layout=True) _ = ax.set_ylim(-2, 1.75) _ = ax.set_xlim("1989", "2021") _ = ax.axhline(0, xmin=0.05, xmax=0.50, c='deep...
https://stackoverflow.com/questions/74990355/valueerror-image-size-of-154660x122-pixels-is-too-large-it-must-be-less-than-2
python, pandas, data-analysis, timeline
1,672,731,951
se_74985538
stackoverflow
DATA_SCIENCE
Reading a Text file with numbers into a vector for working
Reading a Text file with numbers into a vector for working I am a turbo noob at R but I am looking to get my feet wet more with it. I have a text file with numbers that looks like: 1 2 10 15 (I can also produce these numbers with a comma and space if needed i.e 1, 2, 10, 15) I am attempting to read these numbers as ...
https://stackoverflow.com/questions/74985538/reading-a-text-file-with-numbers-into-a-vector-for-working
r, data-science, data-analysis
1,672,681,661
se_74983487
stackoverflow
DATA_SCIENCE
How to select interval of time or values range for timeseries data
How to select interval of time or values range for timeseries data I am working on time-series. which has two columns unit_time and traffic_load. In unit_time I have values from 0 to 7140. In traffic_load column I have different float values. I want to select the interval of time from 360 to 1000. When I try with the ...
https://stackoverflow.com/questions/74983487/how-to-select-interval-of-time-or-values-range-for-timeseries-data
machine-learning, jupyter-notebook, time-series, data-analysis
1,672,669,093
se_74981058
stackoverflow
DATA_SCIENCE
Is it possible to visualize the data on SageMaker processing job?
Is it possible to visualize the data on SageMaker processing job? I am working on creating a custom Sagemaker processing job that transforms my dataset. I want to plot the data matrix before and after the job i.e., visualize the job. It is possible for me to create another processing job that does this plotting. Howev...
https://stackoverflow.com/questions/74981058/is-it-possible-to-visualize-the-data-on-sagemaker-processing-job
amazon-web-services, machine-learning, data-analysis, amazon-sagemaker
1,672,653,898
se_71767993
stackoverflow
DATA_SCIENCE
geom_col in R making bars next to each other
geom_col in R making bars next to each other With the following code A2c%>% group_by (maritalStatus, Geschlecht)%>% summarise (nbr_total=n(), nbr_adipos=sum(Adipös))%>% mutate( adipos_prozent = 100 * nbr_adipos / nbr_total )%>% filter (maritalStatus != "Refused")%>% ggplot+ geom_col(aes(x=maritalStatus, y=...
https://stackoverflow.com/questions/71767993/geom-col-in-r-making-bars-next-to-each-other
r, ggplot2, data-analysis, geom-col
1,649,252,937
se_74969681
stackoverflow
DATA_SCIENCE
Pandas groupby 2 coluns/conditions then value_counts() by another column?
Pandas groupby 2 coluns/conditions then value_counts() by another column? Here's what the dataset I'm working on looks like: Type SubType Municipality Social Media Facebook New Castle Onground Campus Monroe Onground Cafe Kutlski Social Media Instagram New Castle Social Media Tiktok San Andreas Social...
https://stackoverflow.com/questions/74969681/pandas-groupby-2-coluns-conditions-then-value-counts-by-another-column
python, pandas, group-by, data-analysis
1,672,491,549
se_74968684
stackoverflow
DATA_SCIENCE
How to split a a string data into the same column / single column - without affecting the dataset itself (Python Pandas)?
How to split a a string data into the same column / single column - without affecting the dataset itself (Python Pandas)? The data set I'm working on has got a column with zipcodes in it. Some entries only have one zipcode, some have 2, 5, or 10+ zipcodes. Like this: Zipcode(s) 1245 5863, 5682, 1995 6978, ...
https://stackoverflow.com/questions/74968684/how-to-split-a-a-string-data-into-the-same-column-single-column-without-affe
python, pandas, dataframe, split, data-analysis
1,672,479,481
se_74958862
stackoverflow
DATA_SCIENCE
Creating neat .csv file from a giant dictionary
Creating neat .csv file from a giant dictionary I have created dictionary from ESPN's API with a bunch of data I need, and it is all neat and organized. I need this data in .csv for my friend to do machine learning on it, but I do not know where to begin. Here is my code that formats the data from the API into dict da...
https://stackoverflow.com/questions/74958862/creating-neat-csv-file-from-a-giant-dictionary
python, pandas, data-analysis
1,672,383,006
se_74934627
stackoverflow
DATA_SCIENCE
Invalid Time String Error when trying to change type of data from string to time
Invalid Time String Error when trying to change type of data from string to time I am very new to data analytics and I need some help troubleshooting a SQL error I got. So, I have a column in this table which transferred over from Excel to SQL as a string type rather than a time piece of data. I want to make it into a...
https://stackoverflow.com/questions/74934627/invalid-time-string-error-when-trying-to-change-type-of-data-from-string-to-time
sql, google-bigquery, casting, data-analysis
1,672,180,033
se_74931345
stackoverflow
DATA_SCIENCE
How to drop rows from a dataset where the value counts are low
How to drop rows from a dataset where the value counts are low I'm trying to contruct an ML model and don't want to skew it. I will be employing SMOTE but there are some of the value counts in the house_type column that are just too low to merit keeping them in the dataset when constructing this model. How do I drop t...
https://stackoverflow.com/questions/74931345/how-to-drop-rows-from-a-dataset-where-the-value-counts-are-low
python, dataset, data-analysis
1,672,155,945
se_68202331
stackoverflow
DATA_SCIENCE
How to find rows of a DataFrame that matches a given set of conditions for all columns?
How to find rows of a DataFrame that matches a given set of conditions for all columns? Given the following Pandas DataFrame, how can I get all the rows where only Test1 and Test2 failed? In my true dataset I have about 70 different tests and need an easy way to filter devices based on different tests they failed. imp...
https://stackoverflow.com/questions/68202331/how-to-find-rows-of-a-dataframe-that-matches-a-given-set-of-conditions-for-all-c
python, pandas, data-analysis
1,625,092,863
se_62810630
stackoverflow
DATA_SCIENCE
Outliers in Categorical Data?
Outliers in Categorical Data? I am unable to find a solution to find outliers in categorical data. My data consists of combinations of rows. I want to mark outliers that differ in certain combinations. In the above question as specified, I cannot cluster the data as a nonoutlier data row and the outlier row consisting...
https://stackoverflow.com/questions/62810630/outliers-in-categorical-data
python, data-science, data-analysis, outliers
1,594,283,392
se_74934042
stackoverflow
DATA_SCIENCE
SyntaxError: EOL while scanning string literal
SyntaxError: EOL while scanning string literal This is what it was asked for me to do: Remove the dollar sign and comma from the columns. If necessary, convert these two columns to the appropriate data type. As my dataset does not contain values with $ sign, I am removing the '." in the numbers of review for "," for...
https://stackoverflow.com/questions/74934042/syntaxerror-eol-while-scanning-string-literal
python, analytics, data-analysis, dynamic-data-display
1,672,174,435
se_74934656
stackoverflow
DATA_SCIENCE
Unable to upload a file with RSelenium
Unable to upload a file with RSelenium Using this code snippet, I have been able to get RSelenium to bring up a dialog box that allows me to select the file I would like to upload. However, my goal is to pass the file itself to the upload button; what am I missing? I am attempting to upload to a list of climate statio...
https://stackoverflow.com/questions/74934656/unable-to-upload-a-file-with-rselenium
r, web-scraping, file-upload, data-analysis, rselenium
1,672,180,342
se_74930368
stackoverflow
DATA_SCIENCE
How to merge same name column from two different dataframes?
How to merge same name column from two different dataframes? I have four different datasets. I have merged three of the dataframes correctly. I have same name column in 3rd and 4th dataset. When I merge it with 4th dataset. I am not getting the same name column values in well mannerd way. The user_id is repeating when...
https://stackoverflow.com/questions/74930368/how-to-merge-same-name-column-from-two-different-dataframes
dataframe, machine-learning, jupyter-notebook, data-science, data-analysis
1,672,150,350
se_74923958
stackoverflow
DATA_SCIENCE
The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() I got this error The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() Let be x an array of continuous numerical values between 0 and 10 dts1['NewCol'] = np.apply_along_axis(getbool,axis=0...
https://stackoverflow.com/questions/74923958/the-truth-value-of-an-array-with-more-than-one-element-is-ambiguous-use-a-any
pandas, data-science, data-analysis, exploratory-data-analysis
1,672,088,592
se_74916041
stackoverflow
DATA_SCIENCE
LAG and/or LEAD alternative without window function in Pstgresql
LAG and/or LEAD alternative without window function in Pstgresql Well I'm using Postgresql(but it won't matter if you can advise a solution in any SQL syntax), I have a table like employee department salary 1 sales 30,000 2 sales 25,000 3 marketing 45,000 4 marketing 55,000 so on... What I want to ac...
https://stackoverflow.com/questions/74916041/lag-and-or-lead-alternative-without-window-function-in-pstgresql
database, analytics, data-analysis
1,672,004,820
se_74907444
stackoverflow
DATA_SCIENCE
(iterable object in the new array name) Creating multiple numpy arrays with different names using a for loop to break a larger numpy array
(iterable object in the new array name) Creating multiple numpy arrays with different names using a for loop to break a larger numpy array I have a big array "lines" of size (98182, 2). The first column is just a counter which starts from 1 multiple times within the array. So I wrote a small loop to find indices of ev...
https://stackoverflow.com/questions/74907444/iterable-object-in-the-new-array-name-creating-multiple-numpy-arrays-with-diff
python, arrays, numpy, loops, data-analysis
1,671,882,657
se_74889095
stackoverflow
DATA_SCIENCE
Two-column output of setdiff() in R
Two-column output of setdiff() in R My work is with proteomics analysis, and I'm using R for the first time. So my input is in .txt and is a list of protein names, as I use the setdiff() function in a specific set of data instead of giving me a single column of proteins is giving me a double-column output. This didn't...
https://stackoverflow.com/questions/74889095/two-column-output-of-setdiff-in-r
r, data-analysis
1,671,715,086
se_74874976
stackoverflow
DATA_SCIENCE
How to add rows into table by condition in ClickHouse?
How to add rows into table by condition in ClickHouse? I have a table in ClickHouse with events of connecting and disconnecting to system. Query select timestamp, username, event from table gives following result. timestamp username event December 20, 2022, 18:24 1 Connect December 20, 2022, 18:30 1 Disconne...
https://stackoverflow.com/questions/74874976/how-to-add-rows-into-table-by-condition-in-clickhouse
sql, data-analysis, clickhouse
1,671,620,052
se_74873254
stackoverflow
DATA_SCIENCE
GROUP BY function ret
GROUP BY function ret start end category 2022:10:14 17:13:00 2022:10:14 17:19:00 A 2022:10:01 16:29:00 2022:10:01 16:49:00 B 2022:10:19 18:55:00 2022:10:19 19:03:00 A 2022:10:31 07:52:00 2022:10:31 07:58:00 A 2022:10:13 18:41:00 2022:10:13 19:26:00 B The table is sample data about trips the target is t...
https://stackoverflow.com/questions/74873254/group-by-function-ret
mysql, data-analysis
1,671,611,766
se_74872071
stackoverflow
DATA_SCIENCE
Best Approaches to summarize or aggregate multiple rows to single row for Machine learning model creation
Best Approaches to summarize or aggregate multiple rows to single row for Machine learning model creation Creating a ML model for predictive maintenance . table A contains log information with start time , end time and event status. table A Id startTime endTime event 100 7/1/2021 1:05:04 7/1/2021 1:06:04 OS ...
https://stackoverflow.com/questions/74872071/best-approaches-to-summarize-or-aggregate-multiple-rows-to-single-row-for-machin
machine-learning, data-science, aggregate, data-analysis
1,671,604,140
se_73630012
stackoverflow
DATA_SCIENCE
How to create a timeseries starting &quot;2000-01-01&quot; and 10 weekends(saturdays) after that having random numbers as values.(in Python)?
How to create a timeseries starting &quot;2000-01-01&quot; and 10 weekends(saturdays) after that having random numbers as values.(in Python)? rnge = pd.date_range(start = "2000-01-01" ,periods =14 , freq = "D") rnge I want saturdays to be excluded.
https://stackoverflow.com/questions/73630012/how-to-create-a-timeseries-starting-2000-01-01-and-10-weekendssaturdays-afte
python, date, time, data-analysis, series
1,662,523,437
se_74856593
stackoverflow
DATA_SCIENCE
How to create a list considering a condition in sql (azure databricks)
How to create a list considering a condition in sql (azure databricks) I am working on a SQL query (Azure Databricks environment), where considering the following dataset: clientid visited channel purchase visit_order 123 abc133 google 0 1 123 efg446 facebook 0 2 123 gij729 instagram 1 3 456 klm183 googl...
https://stackoverflow.com/questions/74856593/how-to-create-a-list-considering-a-condition-in-sql-azure-databricks
sql, data-analysis, azure-databricks, databricks-sql, exploratory-data-analysis
1,671,488,200
se_74851490
stackoverflow
DATA_SCIENCE
Filter the games that were released in different years in different platforms (R)
Filter the games that were released in different years in different platforms (R) I have a csv file with video games info. The columns are | Rank | Name | Platform | Year | Genre | Publisher | NA_Sales | EU_Sales | JP_Sales | Other_Sales | Global_Sales | Note: Sales are in millions. One row would be: 259, Asteroids, ...
https://stackoverflow.com/questions/74851490/filter-the-games-that-were-released-in-different-years-in-different-platforms-r
r, data-analysis
1,671,458,179
se_74848080
stackoverflow
DATA_SCIENCE
Show density and frequency on the same histogram
Show density and frequency on the same histogram I would like to see both the density and frequency on my histogram. For example, display density on the left side and frequency on the right side. Here is my code: import numpy as np import pandas as pd import matplotlib.pyplot as plt x = [6.950915827194559, 0.57044647...
https://stackoverflow.com/questions/74848080/show-density-and-frequency-on-the-same-histogram
python, matplotlib, data-analysis
1,671,439,815
se_74850646
stackoverflow
DATA_SCIENCE
How to add the interaction term between dummies and continuous variable?
How to add the interaction term between dummies and continuous variable? I want to include university-specific linear time trends in the following regression. The data is like this: unitid year 100654 1991 100654 1992 100654 1993 model <- plm(gradrate4yr ~ block1 + block2 + instatetuition + faculty + c...
https://stackoverflow.com/questions/74850646/how-to-add-the-interaction-term-between-dummies-and-continuous-variable
r, regression, linear-regression, data-analysis, coefficients
1,671,453,480
se_74829240
stackoverflow
DATA_SCIENCE
How to extract values from stacked raster layers(asc format) to occurence(csv) data?
How to extract values from stacked raster layers(asc format) to occurence(csv) data? #Loading climate data bio6 <- raster("bio_06.asc") bio5 <- raster("bio_05.asc") predictors <- stack(bio5, bio6) predictors` #Loading occurrence data which is in long and lat occ <- read.csv("presence_locations.csv")[,-1] Now when I ...
https://stackoverflow.com/questions/74829240/how-to-extract-values-from-stacked-raster-layersasc-format-to-occurencecsv-d
r, geospatial, data-analysis, raster, spatial
1,671,220,837
se_74836723
stackoverflow
DATA_SCIENCE
BASIC Questions: Using ROUND for calculations
BASIC Questions: Using ROUND for calculations I am in Google's Data Analytics course and every now and then I get to a spot where I could just press on, but I want to know the answer anyway. We are learning embedded calculations and a very simply equation was given: ` SELECT Date, Region, Total_Bags, Small_B...
https://stackoverflow.com/questions/74836723/basic-questions-using-round-for-calculations
sql, google-cloud-platform, google-bigquery, data-analysis
1,671,303,865
se_74812287
stackoverflow
DATA_SCIENCE
How to fix NaN values in concatenated multiple tables in Jupyter Notebook
How to fix NaN values in concatenated multiple tables in Jupyter Notebook I am using Jupyter Notedbook. I have concatenated multiple tables. When I run the head() command I am not able to see the values in age and gender columns in a table rather than it's showing me NaN values against each user_id. The following imag...
https://stackoverflow.com/questions/74812287/how-to-fix-nan-values-in-concatenated-multiple-tables-in-jupyter-notebook
python-3.x, machine-learning, jupyter-notebook, data-science, data-analysis
1,671,110,862
se_74773419
stackoverflow
DATA_SCIENCE
How do I apply permanent style changes to a data frame?
How do I apply permanent style changes to a data frame? I'm trying to apply permanent style changes to my data frame (by using inplace=True) after using the dataset.style.format() function because I want adding zeros to some columns. I put inplace=True inside the format function: dataset.style.format( { 'S...
https://stackoverflow.com/questions/74773419/how-do-i-apply-permanent-style-changes-to-a-data-frame
python, pandas, dataframe, data-analysis
1,670,858,778
se_70737343
stackoverflow
DATA_SCIENCE
NameError: name &#39;resample&#39; is not defined
NameError: name &#39;resample&#39; is not defined I am trying to use the resample method in python but getting the below error: --------------------------------------------------------------------------- NameError Traceback (most recent call last) <ipython-input-22-9ff5896e97a3> in <module> ----> 1 df_no_default_downs...
https://stackoverflow.com/questions/70737343/nameerror-name-resample-is-not-defined
python, pandas, jupyter-notebook, data-analysis
1,642,401,092
se_74828015
stackoverflow
DATA_SCIENCE
How do I color flagged rows in an excel file exported from a pandas dataframe?
How do I color flagged rows in an excel file exported from a pandas dataframe? I am cleaning some data on an excel sheet using pandas dataframes, and I have a list of flagged indices. Is there a way to color these specific rows red or yellow in pandas itself before exporting? The flagged indices are is a list: [30556,...
https://stackoverflow.com/questions/74828015/how-do-i-color-flagged-rows-in-an-excel-file-exported-from-a-pandas-dataframe
python, pandas, dataframe, data-analysis
1,671,212,549
se_74813339
stackoverflow
DATA_SCIENCE
How do I delete whole rows from a dataframe based on specific criteria using Pandas and RegEx?
How do I delete whole rows from a dataframe based on specific criteria using Pandas and RegEx? I am new to Pandas and am working with a dataset of 8000 rows. Here is a snippet from it: These are some of the lines. (https://i.sstatic.net/8ftng.png) I have imported the file and named it 'df'. I have been trying to delet...
https://stackoverflow.com/questions/74813339/how-do-i-delete-whole-rows-from-a-dataframe-based-on-specific-criteria-using-pan
python, pandas, csv, data-analysis
1,671,115,689
se_74808538
stackoverflow
DATA_SCIENCE
FDA with R: How to get max() of curve in fda-object?
FDA with R: How to get max() of curve in fda-object? I have some functional data as fda-object. Now I got the first derivative and want to have the coordinates of the maximum value of each single curve. How is this possible? For better understanding I include some fictional data I took from here: library(fdaoutlier); ...
https://stackoverflow.com/questions/74808538/fda-with-r-how-to-get-max-of-curve-in-fda-object
r, max, data-analysis
1,671,091,905
se_74808287
stackoverflow
DATA_SCIENCE
How do I add 5 blank columns between every other filled column?
How do I add 5 blank columns between every other filled column? I have a dataframe containing N=11 variables. The X's are column names defined by R. filenames=gtools::mixedsort(c("a1", "a10", "a11", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9")) filenames<-data.frame(t(filenames)) list(filenames) X1 X2 X3 X4 X5...
https://stackoverflow.com/questions/74808287/how-do-i-add-5-blank-columns-between-every-other-filled-column
r, data-analysis
1,671,090,357
se_74807401
stackoverflow
DATA_SCIENCE
How do I loop the merging of Excel cells every 6 cells using R?
How do I loop the merging of Excel cells every 6 cells using R? I'm trying to use R to automatically merge existing cells within an imported excel workbook. In the first row, I want to merge 6 cells at a time until the end of the table. If I want to do the 6-cell merging N number of times, I have to repeat the mergeCe...
https://stackoverflow.com/questions/74807401/how-do-i-loop-the-merging-of-excel-cells-every-6-cells-using-r
r, data-analysis
1,671,084,217
se_74806559
stackoverflow
DATA_SCIENCE
How do I sort a vector with names containing many strings of numbers in R?
How do I sort a vector with names containing many strings of numbers in R? I have a list of names which I would like to sort by the R value in ascending order. [1] "W2345_S-001-R2-20D.datavalue.csv" "W2346_S-001-R4-20D.datavalue.csv" [3] "W2347_S-001-R1-20D.datavalue.csv" "W2348_S-001-R3-20D.datavalue.csv"...
https://stackoverflow.com/questions/74806559/how-do-i-sort-a-vector-with-names-containing-many-strings-of-numbers-in-r
r, string, data-analysis
1,671,075,224
se_74798668
stackoverflow
DATA_SCIENCE
How to calculate mean value in R summarize statement based on a condition?
How to calculate mean value in R summarize statement based on a condition? Coffee import data of several countries Problem background *Element *col has two categorical values: Import Quantity and Import Value item col has five categorical values: Coffee Green, Coffee Extracts, Coffee husks and skins, Coffee substitute...
https://stackoverflow.com/questions/74798668/how-to-calculate-mean-value-in-r-summarize-statement-based-on-a-condition
r, dataframe, data-analysis, mean, summarize
1,671,022,706
se_74793282
stackoverflow
DATA_SCIENCE
Removing All Text From a Column
Removing All Text From a Column I am trying to teach myself Python for data analysis, and I am working with a dataset that contains both strings and integers. enter image description here I was able to fix the reviews_avg column by using : df['reviews_avg_num'] = df['reviews_avg'].str[8:11] That took out all text and ...
https://stackoverflow.com/questions/74793282/removing-all-text-from-a-column
python, python-3.x, dataframe, data-science, data-analysis
1,670,988,605
se_70033341
stackoverflow
DATA_SCIENCE
Plotting a bar plot with seaborn
Plotting a bar plot with seaborn The data frame I am using: https://www.kaggle.com/mustiztemiz/diabetes I have the following column: Outcome - which has values 0 or 1. I want to plot a barplot which has Outcome on the x-axis and the it's count on y-axis. My code is as follows: sns.barplot(x='Outcome', y=diabetes['Outc...
https://stackoverflow.com/questions/70033341/plotting-a-bar-plot-with-seaborn
python, python-3.x, seaborn, bar-chart, data-analysis
1,637,317,702
se_74790178
stackoverflow
DATA_SCIENCE
I want to find sum total of the count of hospitals, I have written following query, Its showing error: Every derived table must have its own alias
I want to find sum total of the count of hospitals, I have written following query, Its showing error: Every derived table must have its own alias #Total No of hospitals from each state# select sum(num_of_hosp) from (select count(distinct hospital) as num_of_hosp from project.dataset where score != 'not available' gro...
https://stackoverflow.com/questions/74790178/i-want-to-find-sum-total-of-the-count-of-hospitals-i-have-written-following-que
mysql, database, count, subquery, data-analysis
1,670,961,001
se_74648167
stackoverflow
DATA_SCIENCE
Issue with Joining Tables in SQL
Issue with Joining Tables in SQL SQL newbie here, using Zoho Analytics to do some reporting, specifically with prorated forecasting of lead generation. I successfully created some tables that contain lead goals, and joined them onto matching leads based off of the current month. The problem I am having is I would like...
https://stackoverflow.com/questions/74648167/issue-with-joining-tables-in-sql
sql, analytics, data-analysis, zoho
1,669,928,740
se_74768146
stackoverflow
DATA_SCIENCE
Get single value count across the whole dataset
Get single value count across the whole dataset I'm new at pandas and surveying the internet for my learning I've used count(), value_counts() to count values column wise but now I'm stuck in a problem. I've a car crash reporting dataset that has it's empty value replaced with "Not Reported" so I wanted to count the n...
https://stackoverflow.com/questions/74768146/get-single-value-count-across-the-whole-dataset
python-3.x, pandas, dataframe, data-analysis
1,670,831,978
se_74668460
stackoverflow
DATA_SCIENCE
Which learning model should be chosen to predict text news tags?
Which learning model should be chosen to predict text news tags? I have a database of news texts (100000 samples). Half of the dataset is tagged, and half is not, what methodology can I use to analyze the remaining news and fill them with tags? Data example: Text = A cap on the price of Russian oil will restrict Russ...
https://stackoverflow.com/questions/74668460/which-learning-model-should-be-chosen-to-predict-text-news-tags
python, nlp, data-science, data-analysis, tagging
1,670,084,533
se_74755456
stackoverflow
DATA_SCIENCE
Solution to handle billions of records for faster insertion and instant retrieval
Solution to handle billions of records for faster insertion and instant retrieval I have a text file(call it grand parent file) which contains 1 million lines. Each of these lines contain absolute paths of some other files(call them parents) as shown below. The paths of parent files are unique. %: cat input.txt - gran...
https://stackoverflow.com/questions/74755456/solution-to-handle-billions-of-records-for-faster-insertion-and-instant-retrieva
database, algorithm, bigdata, data-analysis, system-design
1,670,695,991
se_74746615
stackoverflow
DATA_SCIENCE
Filtering in Python
Filtering in Python I am new in Python sorry if my question doesn't suit here. I have a large datasets related to Airbnb. There is a column called city which has main cities in the USA: 1- NYC 2-Chicago, And Los Angelos I want to do the analysis only in NYC. Here is my method so far import numpy as np import pandas ...
https://stackoverflow.com/questions/74746615/filtering-in-python
python, data-analysis
1,670,608,163
se_74742347
stackoverflow
DATA_SCIENCE
Matlab - Assigning matching variables between two data sets and creating a new table
Matlab - Assigning matching variables between two data sets and creating a new table I'm currently working with two data sets, as shown below: Data set 1: Point_ID Record Difference (m) '2804AJGCA57' 'Record003 - 220428_103738_Scanner_1 - 2804AJGCA57' '0.035240' '2804AJGCA28' 'Record003 - 220428_103738_Scann...
https://stackoverflow.com/questions/74742347/matlab-assigning-matching-variables-between-two-data-sets-and-creating-a-new-t
python, matlab, datatables, data-analysis
1,670,584,590
se_74723872
stackoverflow
DATA_SCIENCE
How do I convert multiple categorical variables into binary based on their value (Python)?
How do I convert multiple categorical variables into binary based on their value (Python)? I am trying to do a classification project and I need to make the target variable into binary. The target variable is "quality" and all the values are from 0-10. I am trying to make values less than 6.5 = 'poor', and values grea...
https://stackoverflow.com/questions/74723872/how-do-i-convert-multiple-categorical-variables-into-binary-based-on-their-value
python, classification, data-analysis, data-conversion
1,670,454,948
se_74727736
stackoverflow
DATA_SCIENCE
display all files in data frame using python pandas
display all files in data frame using python pandas I am trying to create a data frame from a data set of 1000 .txt files, then loop through the files and gets the title, Author, language, etc to form a single data frame. from glob import glob files = glob('dataset/*.txt') files.sort() files for n in files: wit...
https://stackoverflow.com/questions/74727736/display-all-files-in-data-frame-using-python-pandas
python, pandas, dataframe, dataset, data-analysis
1,670,489,842
se_74727125
stackoverflow
DATA_SCIENCE
Pandas Drop rows if String has numeric (floats of 4 decimals/5 numbers)
Pandas Drop rows if String has numeric (floats of 4 decimals/5 numbers) I have a long list dataframe that has texts similar to the example provided in the image. dataframe is called gbs2. I want to gbs2.drop rows with numerical values that has 4 decimal places or 5 numbers ("1.2345" or "12345") Code used: name = pd.Se...
https://stackoverflow.com/questions/74727125/pandas-drop-rows-if-string-has-numeric-floats-of-4-decimals-5-numbers
python, pandas, dataframe, data-analysis
1,670,486,188
se_74721355
stackoverflow
DATA_SCIENCE
How to remove all rows of a datframe column that contain a question mark instead of occupation
How to remove all rows of a datframe column that contain a question mark instead of occupation This is my attempt: df['occupation']= df['occupation'].str.replace('?', '') df.dropna(subset=['occupation'], inplace=True) but it is not working, How do i remove all of the rows of the occupation column that i read from a...
https://stackoverflow.com/questions/74721355/how-to-remove-all-rows-of-a-datframe-column-that-contain-a-question-mark-instead
python, pandas, data-analysis
1,670,437,538
se_74708843
stackoverflow
DATA_SCIENCE
Vegan package (diversity) calculates results incorrectly
Vegan package (diversity) calculates results incorrectly so I need to calculate alpha diversity (simpson) for a database I got for the fish found in six different sites (12 entries, 6 columns) . When I use the diversity() function in the vegan package I get an error as it calculates each of the 12 entries as simpson f...
https://stackoverflow.com/questions/74708843/vegan-package-diversity-calculates-results-incorrectly
r, dataframe, data-analysis, analysis, vegan
1,670,359,554