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_75120792 | stackoverflow | DATA_SCIENCE | How can I split my dataframe by year or month | How can I split my dataframe by year or month
I have a dataframe that contains a time series with hourly data form 2015 to 2020. I want to create a new dataframe that has a column with the values of the time series for each year or for each month of each year to perform a separate analysis. As I have 1 leap year, I wa... | https://stackoverflow.com/questions/75120792/how-can-i-split-my-dataframe-by-year-or-month | python, pandas, data-science | 1,673,725,706 |
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_75142372 | stackoverflow | DATA_SCIENCE | Adding and removing trend to time series data | Adding and removing trend to time series data
I have time series data. By linear regression I have removed the increasing trend from the data.
Is it possible to add the same trend to data the data predicted by linear regression?
The trend has been removed. Now I want to get the original data from the detrended data. A... | https://stackoverflow.com/questions/75142372/adding-and-removing-trend-to-time-series-data | machine-learning, time-series, data-science, reverse-engineering, trend | 1,673,934,533 |
se_75138222 | stackoverflow | DATA_SCIENCE | Making operations with Multindex DataFrame | Making operations with Multindex DataFrame
I have a GroupBy Data Frame that is similar to this one:
I want to create a column named PL as the difference between the Position of the same Product of the same Client buyed on the same day with the previous day's position. Also the first dates should have PL = 0.
The data... | https://stackoverflow.com/questions/75138222/making-operations-with-multindex-dataframe | python, pandas, database, dataframe, data-science | 1,673,893,367 |
se_75124795 | stackoverflow | DATA_SCIENCE | Looping over and mapping slices of a DataArray in xarray | Looping over and mapping slices of a DataArray in xarray
Say I have a multidimensional DataArray and I would like to loop over slices according to some dimension and change them. For example, the first dimension is time and I would like for each time to receive a DataArray that represents a slice of that time and map ... | https://stackoverflow.com/questions/75124795/looping-over-and-mapping-slices-of-a-dataarray-in-xarray | python, numpy, data-science, python-xarray | 1,673,783,026 |
se_65679417 | stackoverflow | DATA_SCIENCE | Getting errors while installing Surprise package | Getting errors while installing Surprise package
I am using the below command while installing surprise package. I have got error messages while installing and I am not able to understand. I need help to install this package successfully.
pip install scikit-surprise
one of the error code in the last says that Microsof... | https://stackoverflow.com/questions/65679417/getting-errors-while-installing-surprise-package | machine-learning, anaconda, data-science | 1,610,435,459 |
se_58680157 | stackoverflow | DATA_SCIENCE | Fill in the missing data using Pandas | Fill in the missing data using Pandas
What's the best way to fill in the missing data using Pandas . I have a list of visitors where the exit time or the entry time is missing .
visitor entry exit
A 16/02/2016 08:46 16/02/2016 09:01
A 16/02/2016 09:20 16/02/2016 17:24
A 17/02/2016 09:12 17/... | https://stackoverflow.com/questions/58680157/fill-in-the-missing-data-using-pandas | python-3.x, pandas, dataset, data-science, fillna | 1,572,784,173 |
se_75124346 | stackoverflow | DATA_SCIENCE | How do I control the magnitude at which I shuffle my dataset | How do I control the magnitude at which I shuffle my dataset
I have a dataset X where each data point (each row) is in a particular order.
To totally shuffle the X, I use something like this:
shufX = torch.randperm(len(X))
X=X[shufX]
Say I just want to mildly shuffle (maybe shift positions of a few da... | https://stackoverflow.com/questions/75124346/how-do-i-control-the-magnitude-at-which-i-shuffle-my-dataset | python, numpy, machine-learning, data-science, torch | 1,673,778,170 |
se_75124003 | stackoverflow | DATA_SCIENCE | Jupyter lab connection to github | Jupyter lab connection to github
This shows tab of git without error,This shows Git tab i have problem with jupyter lab, in Git tab there is no ‘Add Remote Repository’ option ,which allow me to connect to github remote repo can anyone help ples
i tried to connect to remote bu using Git repository terminal in git menu... | https://stackoverflow.com/questions/75124003/jupyter-lab-connection-to-github | git, github, data-science, jupyter-lab, git-extensions | 1,673,773,863 |
se_75127693 | stackoverflow | DATA_SCIENCE | How is Neo4J intended to fit into a Data Scientists work flow? | How is Neo4J intended to fit into a Data Scientists work flow?
For a Data Scientist that does network analysis mostly in Python, pulling data from a relational database, how is Neo4J intended to change my workflow? Is it mostly intended to efficiently query data (replace the relational database) or also data explorati... | https://stackoverflow.com/questions/75127693/how-is-neo4j-intended-to-fit-into-a-data-scientists-work-flow | python, neo4j, data-science | 1,673,809,600 |
se_42858677 | stackoverflow | DATA_SCIENCE | scikit-learn: filling missing values by random sampling | scikit-learn: filling missing values by random sampling
I am surprised that sklearn.preprocessing.Imputer does not offer the following strategy for filling missing values: For any missing value, sample uniformly at random one value from the given values and replace.
I assume that this is a better strategy than replac... | https://stackoverflow.com/questions/42858677/scikit-learn-filling-missing-values-by-random-sampling | python, machine-learning, scikit-learn, data-science | 1,489,756,912 |
se_75126093 | stackoverflow | DATA_SCIENCE | why is the minimum value is 18K but my original data has maximum value 12K | why is the minimum value is 18K but my original data has maximum value 12K
my data has a maximum value of 12K but when i visualize the data it says that the minmum value is 18K which is WRONG
the problem is with the A(s) variable
this is the code in python
date CLEARANCE PERMITS INSPECTION Facilities license... | https://stackoverflow.com/questions/75126093/why-is-the-minimum-value-is-18k-but-my-original-data-has-maximum-value-12k | python, pandas, time-series, data-science, visualize | 1,673,795,431 |
se_75125180 | stackoverflow | DATA_SCIENCE | How to manipulate Pandas Series without changing the given Original? | How to manipulate Pandas Series without changing the given Original?
Context
I have a method that takes a Pandas Series of categorial Data and returns it as an indexed version. However, I think my implementation is also modifying the given Series, not just returning a modified new Series. I also get the following Erro... | https://stackoverflow.com/questions/75125180/how-to-manipulate-pandas-series-without-changing-the-given-original | python, pandas, numpy, data-science, series | 1,673,786,966 |
se_75075447 | stackoverflow | DATA_SCIENCE | Google Document AI Labeling Task | Google Document AI Labeling Task
Here everyone, I am fairly new google cloud console. I am trying to customize a google document ai model that will learn to extract different sections of document to various data. As you can on the image that it fails to train the model and I have been running the Labeling Task for sev... | https://stackoverflow.com/questions/75075447/google-document-ai-labeling-task | data-science, google-developers-console, cloud-document-ai | 1,673,382,391 |
se_75097603 | stackoverflow | DATA_SCIENCE | Makefile always running python targets | Makefile always running python targets
I am attempting to automate a data science workflow using Make, and it is not running the way I would expect it to run. Naturally, I believe there is something wrong with my understanding of Make commands, so I am asking the experts for help.
I have read through the following two... | https://stackoverflow.com/questions/75097603/makefile-always-running-python-targets | python, makefile, data-science | 1,673,532,644 |
se_75095578 | stackoverflow | DATA_SCIENCE | Why does the output for this Sequential model constantly changes position everytime I run it back? | Why does the output for this Sequential model constantly changes position everytime I run it back?
So, I'm making a rock paper scissors prediction using multiclass classification, but I have several problems with this code
(1) The data sorting code
import pandas
import sklearn
from sklearn import datasets
import zipfi... | https://stackoverflow.com/questions/75095578/why-does-the-output-for-this-sequential-model-constantly-changes-position-everyt | python, keras, data-science, sequential, multiclass-classification | 1,673,522,583 |
se_75068729 | stackoverflow | DATA_SCIENCE | Pipeline with XGBoost - Imputer and Scaler prevent Model from learning | Pipeline with XGBoost - Imputer and Scaler prevent Model from learning
I'm trying to build a pipeline for data preprocessing for my XGBoost model. The data contains NaNs and needs to be scaled. This is the relevant code:
xgb_pipe = Pipeline(steps=[
('imputer', SimpleImputer(strategy='mean')),
('scaler', prepro... | https://stackoverflow.com/questions/75068729/pipeline-with-xgboost-imputer-and-scaler-prevent-model-from-learning | scikit-learn, data-science, pipeline, xgboost, data-preprocessing | 1,673,347,037 |
se_73078231 | stackoverflow | DATA_SCIENCE | How to get all stop words from Spacy and don't get any errors? TypeError: argument of type 'module' is not iterable | How to get all stop words from Spacy and don't get any errors? TypeError: argument of type 'module' is not iterable
How to get all stop words from spacy.lang.en and don't get any errors?
from spacy.lang.en import stop_words as stop_words
def tokenize(sentence):
sentence = nlp(sentence)
# lemmatiz... | https://stackoverflow.com/questions/73078231/how-to-get-all-stop-words-from-spacy-and-dont-get-any-errors-typeerror-argume | python, nlp, data-science, spacy | 1,658,482,666 |
se_75099002 | stackoverflow | DATA_SCIENCE | How to handle data that has a digit typo in a number | How to handle data that has a digit typo in a number
I have to analyze my data. It is data from World Bank. It has data for all 195 countries. Each country has 15 rows with data for 15 years. At some countries there is a problem with mistyping information. There are input errors in the "Population" column. The person ... | https://stackoverflow.com/questions/75099002/how-to-handle-data-that-has-a-digit-typo-in-a-number | python, pandas, data-science | 1,673,538,780 |
se_75097245 | stackoverflow | DATA_SCIENCE | Dynamically create variable name in python like sas | Dynamically create variable name in python like sas
In a use case in sas I have a var defined as df = 'Jan'
While working with datasets in sas it is written in a SQl case statement like
case when a> 10 then 100 else 250 end as var_&df
output is var_Jan
If I want to do similar thing in python in a dataframe then how to... | https://stackoverflow.com/questions/75097245/dynamically-create-variable-name-in-python-like-sas | python-3.x, pandas, automation, sas, data-science | 1,673,531,062 |
se_75018865 | stackoverflow | DATA_SCIENCE | How to apply PCA in R? | How to apply PCA in R?
I want to apply PCA to my dataset. In my dataset, not all columns are numeric so I checked which one is numeric. And then ı created a subdataset.
pca.dataset <- dataset[,12:55]
sapply(pca.dataset, is.finite)
#remove constant columns
pca.dataset <- remove_constant(pca.dataset)
pca.dataset <- re... | https://stackoverflow.com/questions/75018865/how-to-apply-pca-in-r | r, dataset, data-science, pca | 1,672,923,886 |
se_46011785 | stackoverflow | DATA_SCIENCE | How to do superscripts and subscripts in Jupyter Notebook? | How to do superscripts and subscripts in Jupyter Notebook?
I want to to use numbers to indicate references in footnotes, so I was wondering inside of Jupyter Notebook how can I use superscripts and subscripts? | https://stackoverflow.com/questions/46011785/how-to-do-superscripts-and-subscripts-in-jupyter-notebook | python, jupyter-notebook, jupyter, data-science | 1,504,339,711 |
se_68196865 | stackoverflow | DATA_SCIENCE | How to implement GRiS mean and deviation | How to implement GRiS mean and deviation
I am dealing with skewness in a data set and wanted to use a modern approach. I came across a recent paper which used the Golden Ratio in Statistics (GRiS):
https://www.researchgate.net/publication/314032599_TO_DETERMINE_SKEWNESS_MEAN_AND_DEVIATION_WITH_A_NEW_APPROACH_ON_CONTIN... | https://stackoverflow.com/questions/68196865/how-to-implement-gris-mean-and-deviation | python, machine-learning, statistics, data-science | 1,625,063,875 |
se_75076475 | stackoverflow | DATA_SCIENCE | User input to find data in CSV and then search through JSON dictionary | User input to find data in CSV and then search through JSON dictionary
I'm new to programming and I've been trying to figure out how to use a CSV file to access data within a JSON. Basically, I want to take 3 user inputs, search through the CSV and store information in variables that can then be used to access locatio... | https://stackoverflow.com/questions/75076475/user-input-to-find-data-in-csv-and-then-search-through-json-dictionary | python, json, dictionary, validation, data-science | 1,673,389,332 |
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_66788763 | stackoverflow | DATA_SCIENCE | How to filter lists within a list in R iteratively or how to filter a data.table using two criteria simultaneously, creating objects at run time | How to filter lists within a list in R iteratively or how to filter a data.table using two criteria simultaneously, creating objects at run time
I'm working on a data.table which contains, among other data, the demand for certain products on certain stores of a business franchise. The goal is to predict the demand for... | https://stackoverflow.com/questions/66788763/how-to-filter-lists-within-a-list-in-r-iteratively-or-how-to-filter-a-data-table | r, data-science, data-wrangling, data-munging | 1,616,617,151 |
se_75074596 | stackoverflow | DATA_SCIENCE | PuLP linear programming problem is infeasible | PuLP linear programming problem is infeasible
I am writing a Linear Programming problem to help generate daily fantasy lineups.
The goal is:
Maximize Fpts projection
The constraints are:
Salary (Maximum 50,000)
Positionality (Have to have 1 PG, 1 SG, 1 SF, 1 PF, 1 C, 1 G, 1 F and 1 UTIL player) where "G" players ar... | https://stackoverflow.com/questions/75074596/pulp-linear-programming-problem-is-infeasible | python, data-science, linear-programming, pulp | 1,673,376,938 |
se_75068630 | stackoverflow | DATA_SCIENCE | how to extract values based upon month in xarray | how to extract values based upon month in xarray
I have an array of dimensions (9131,101,191). The first dimension is the days from 1/1/2075 till 31/12/2099. I want to extract all the days which are in the month of July. How can I do this in xarray? I have tried using loops and numpy but not getting the desired result... | https://stackoverflow.com/questions/75068630/how-to-extract-values-based-upon-month-in-xarray | python, dataframe, data-science, python-xarray | 1,673,346,523 |
se_75055183 | stackoverflow | DATA_SCIENCE | Creating new column with values that depends on other columns | Creating new column with values that depends on other columns
This is my dataframe
import pandas as pd
url = 'https://www.basketball-reference.com/boxscores/pbp/200911060GSW.html'
dfs = pd.read_html(url)
df = dfs[0]
df.columns = df.columns.droplevel() # drops the "1st Q" Multilevel header of the dataframe
df.renam... | https://stackoverflow.com/questions/75055183/creating-new-column-with-values-that-depends-on-other-columns | python, pandas, data-science | 1,673,255,910 |
se_75070367 | stackoverflow | DATA_SCIENCE | unable to read data(csv) using pandas in pycharm | unable to read data(csv) using pandas in pycharm
My code is:-
import pandas as pd
import numpy as np
import plotly.express as px
import plotly.graph_objects as go
import plotly.io as pio
import os
print(os.getcwd())
os.chdir("//Users//apple//Desktop//Employedata")
print(os.getcwd())
p... | https://stackoverflow.com/questions/75070367/unable-to-read-datacsv-using-pandas-in-pycharm | python, data-science | 1,673,355,555 |
se_75065281 | stackoverflow | DATA_SCIENCE | Create bins from an object | Create bins from an object
I have the following series object type
print(df['MySpecificBins'])
Column A
25- 34
19-24
55-64
I can't use this function because my data is not continuous
bins = [-np.inf, 19, 24, 25,34,35,45,54,55,64,65 ,np.inf]
df['MySpecificBins'] = pd.cut(df['MyContinuous'], bins)
How c... | https://stackoverflow.com/questions/75065281/create-bins-from-an-object | pandas, dataframe, numpy, dataset, data-science | 1,673,322,532 |
se_75066345 | stackoverflow | DATA_SCIENCE | Want to convert pdf image created using "matplotlib.backends.backend_pdf import PdfPages" package to byte array | Want to convert pdf image created using "matplotlib.backends.backend_pdf import PdfPages" package to byte array
I am using "matplotlib.backends.backend_pdf" package to create pdf and to store the plot created using matplotlib. But, apart from saving the pdf image in my repository, I want to return a byte arr... | https://stackoverflow.com/questions/75066345/want-to-convert-pdf-image-created-using-matplotlib-backends-backend-pdf-import | python, matplotlib, machine-learning, data-science, visualization | 1,673,332,957 |
se_75066245 | stackoverflow | DATA_SCIENCE | How do I append JSON entries to CSV file under columns with the same names as the keys? | How do I append JSON entries to CSV file under columns with the same names as the keys?
This is my code :
import pandas as pd
import requests
response = requests.get(f'https://www.magicbricks.com/mbsrp/propertySearch.html?editSearch=Y&category=S&propertyType=10002,10003,10021,10022,10001,10017,10000&bedrooms=11700,11... | https://stackoverflow.com/questions/75066245/how-do-i-append-json-entries-to-csv-file-under-columns-with-the-same-names-as-th | python, pandas, csv, web-scraping, data-science | 1,673,332,128 |
se_75057790 | stackoverflow | DATA_SCIENCE | Python / Seaborn - How to plot the names of each value in a scatterplot | Python / Seaborn - How to plot the names of each value in a scatterplot
first of all, in case I comment on any mistakes while writing this, sorry, English is not my first language.
I'm a begginer with Data vizualiation with python, I have a dataframe with 115 rows, and I want to do a scatterplot with 4 quadrants and s... | https://stackoverflow.com/questions/75057790/python-seaborn-how-to-plot-the-names-of-each-value-in-a-scatterplot | python, matplotlib, seaborn, data-science, visualization | 1,673,269,968 |
se_75064337 | stackoverflow | DATA_SCIENCE | Missing data fills, fill with the mean | Missing data fills, fill with the mean
I have a dataset with a column corresponding to categorical data, being A, B, C, D and E, all of these categories correspond to test scores, and some of these scores are NaN values. In this case I want to fill in each of these missing values by the average of the grades. This wou... | https://stackoverflow.com/questions/75064337/missing-data-fills-fill-with-the-mean | python, pandas, dataframe, data-science, missing-data | 1,673,311,249 |
se_75063646 | stackoverflow | DATA_SCIENCE | How to Track Data Difference in Data Pipeline | How to Track Data Difference in Data Pipeline
We have a set of user data that comes in every week. Its in Millions. It consists of bunch of attributes for user (visits, category, product etc) by timestamp.
Now every week, a few 100k records are changed- updated, deleted, added etc. This means same user which had certa... | https://stackoverflow.com/questions/75063646/how-to-track-data-difference-in-data-pipeline | database, amazon-web-services, data-science | 1,673,303,536 |
se_75062729 | stackoverflow | DATA_SCIENCE | Changing the values of a column in pandas dataframe | Changing the values of a column in pandas dataframe
i scraped a html table from a nba game as an pandas dataframe.
import pandas as pd
url = 'https://www.basketball-reference.com/boxscores/pbp/200911060GSW.html'
dfs = pd.read_html(url)
df = dfs[0]
df.rename(columns={'Unnamed: 2_level_1': 'PM1', 'Unnamed: 4_level_1'... | https://stackoverflow.com/questions/75062729/changing-the-values-of-a-column-in-pandas-dataframe | python, pandas, web-scraping, data-science | 1,673,297,052 |
se_75061786 | stackoverflow | DATA_SCIENCE | How to show the yaxis' limit greater than the data's extreme value | How to show the yaxis' limit greater than the data'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_45666970 | stackoverflow | DATA_SCIENCE | What is sigma clipping? How do you know when to apply it? | What is sigma clipping? How do you know when to apply it?
I'm reading a book on Data Science for Python and the author applies 'sigma-clipping operation' to remove outliers due to typos. However the process isn't explained at all.
What is sigma clipping? Is it only applicable for certain data (eg. in the book it's us... | https://stackoverflow.com/questions/45666970/what-is-sigma-clipping-how-do-you-know-when-to-apply-it | python, pandas, numpy, statistics, data-science | 1,502,680,619 |
se_75053283 | stackoverflow | DATA_SCIENCE | FileNotFoundError: [Errno 2] No such file or directory: 'Users/apple/Desktop/Employee+Sample+Data/Employee\\ Sample\\ Data.csv' | FileNotFoundError: [Errno 2] No such file or directory: 'Users/apple/Desktop/Employee+Sample+Data/Employee\\ Sample\\ Data.csv'
I know this question has been asked before, but I am unable to solve this problem
I also know this happens when my python file is not in the same directory has my data file.
when I do... | https://stackoverflow.com/questions/75053283/filenotfounderror-errno-2-no-such-file-or-directory-users-apple-desktop-emp | python, data-science | 1,673,239,681 |
se_75051592 | stackoverflow | DATA_SCIENCE | RandomForestClassifier can't give me repdoucible results | RandomForestClassifier can't give me repdoucible results
My issue is that even though I implemented a Random_state for the RandomForestClassifier itself and for the Train-Test-Split (even I don't think this isn't necessary there because I am working with the shuffle = False - due to Time Series Data). Please find ... | https://stackoverflow.com/questions/75051592/randomforestclassifier-cant-give-me-repdoucible-results | python-3.x, machine-learning, data-science, random-forest, random-seed | 1,673,215,403 |
se_75051509 | stackoverflow | DATA_SCIENCE | How to draw an histogram with float values and a specific step? | How to draw an histogram with float values and a specific step?
I am trying stuff out with plotter-rs and I wanted to create an histogram with float values ranging from 0.0f64 to 1.0f64 and have like 50 segments.
Following is what I have been trying. .build_cartesion_2d() is the part that creates bars with a define ra... | https://stackoverflow.com/questions/75051509/how-to-draw-an-histogram-with-float-values-and-a-specific-step | plot, rust, data-science, visualization | 1,673,214,097 |
se_75046900 | stackoverflow | DATA_SCIENCE | Nested list: How to sum all of the element in index 1 & 2 in these list by using for loop? | Nested list: How to sum all of the element in index 1 & 2 in these list by using for loop?
Each table row contains sales data from stores in different cities:
-The element with index 1 contains sales for the first six months.
-The element with index 2 contains sales for the next six months.
Find the total sales fo... | https://stackoverflow.com/questions/75046900/nested-list-how-to-sum-all-of-the-element-in-index-1-2-in-these-list-by-using | python, list, loops, data-science | 1,673,172,139 |
se_75044646 | stackoverflow | DATA_SCIENCE | NLP and CV Text Processing | NLP and CV Text Processing
I have a pandas dataframe with 3 columns,from chest-Xray report, the columns are "findings", "impression" and "file_Name" with directory information. I have have separate directory of chest-Xray images that i have to crawl through and get the matching "file_Name" (becuase, there are more im... | https://stackoverflow.com/questions/75044646/nlp-and-cv-text-processing | python, pandas, dataframe, nlp, data-science | 1,673,136,282 |
se_75037191 | stackoverflow | DATA_SCIENCE | SUOD Model gives ValueError: Input Contains Nan | SUOD Model gives ValueError: Input Contains Nan
I am running SUOD from pyod which is ensemble method and received this error.
The models that I am running are Iforest, COPOD and ECOD.
Running these models individually does not say that the data has nan values in it. Also I have already verified if any of the columns h... | https://stackoverflow.com/questions/75037191/suod-model-gives-valueerror-input-contains-nan | python-3.x, machine-learning, data-science | 1,673,050,011 |
se_75025551 | stackoverflow | DATA_SCIENCE | How do you reformat a date field as MON-YYYY? | How do you reformat a date field as MON-YYYY?
I have a date field:
Date: YYYY-MM-DD (eg 2002-05-15) that I want to reformat as a date field to read Mon-YY (eg May-02)
when I run the query
select monthname(Date), year(date) from table
I obviously get them as two columns. I've tried
select to_date(monthname(Date) || ' ... | https://stackoverflow.com/questions/75025551/how-do-you-reformat-a-date-field-as-mon-yyyy | sql, snowflake-cloud-data-platform, data-science | 1,672,962,264 |
se_75026832 | stackoverflow | DATA_SCIENCE | How to create consistent time series dataset using an inconsistent time series dataset? | How to create consistent time series dataset using an inconsistent time series dataset?
I am new to data science and machine learning, and I am working on a project involving time series data from wearable devices (using Python programming environment). I have the sampling frequency of each sensor modality for each de... | https://stackoverflow.com/questions/75026832/how-to-create-consistent-time-series-dataset-using-an-inconsistent-time-series-d | python, pandas, time-series, data-science, data-preprocessing | 1,672,977,892 |
se_75040779 | stackoverflow | DATA_SCIENCE | Creating a table in postgres using pandas and psycopg2 gives me an error | Creating a table in postgres using pandas and psycopg2 gives me an error
I am trying to create a database in postgres database using pandas and psycopg2.
The syntax are fine but still gives me an error like:
---------------------------------------------------------------------------
SyntaxError ... | https://stackoverflow.com/questions/75040779/creating-a-table-in-postgres-using-pandas-and-psycopg2-gives-me-an-error | pandas, database, postgresql, data-science, psycopg2 | 1,673,098,970 |
se_71604599 | stackoverflow | DATA_SCIENCE | how to make subplots using user defined function | how to make subplots using user defined function
Can some one help me,i have created one function which can plot scatter plot.If I chnage the agruments in function ,i get different subplots.Now,How can i put this function so that i can put in subplots changing different arguments.
I tried to put function in subplots, ... | https://stackoverflow.com/questions/71604599/how-to-make-subplots-using-user-defined-function | matplotlib, data-science | 1,648,133,213 |
se_74991518 | stackoverflow | DATA_SCIENCE | How to plot in PYthon a BarChart that depicts the number of observations that for each label of a categorical variable? | How to plot in PYthon a BarChart that depicts the number of observations that for each label of a categorical variable?
I know this is very simple but I don't truly know how to do it as I don't usually plot and it's giving me headache. I have two particular problems:
1º Let's imagine I just have an column of a datafra... | https://stackoverflow.com/questions/74991518/how-to-plot-in-python-a-barchart-that-depicts-the-number-of-observations-that-fo | python, pandas, dataframe, matplotlib, data-science | 1,672,738,985 |
se_75010209 | stackoverflow | DATA_SCIENCE | Text Extraction from real world messy files | Text Extraction from real world messy files
WET READ: ___ ___ ___ 7:31 PM
Persistent right lower lung opacity and right pleural effusion. Effusion
perhaps slightly decreased since radiograph dated ___.
______________________________________________________________________________
... | https://stackoverflow.com/questions/75010209/text-extraction-from-real-world-messy-files | python, machine-learning, nlp, data-science | 1,672,859,666 |
se_75017585 | stackoverflow | DATA_SCIENCE | ValueError: `tape` is required when a `Tensor` loss is passed. Received: loss=1950770.5, tape=None | ValueError: `tape` is required when a `Tensor` loss is passed. Received: loss=1950770.5, tape=None
I am trying to implement the deconfounder of Wang and Blei (https://colab.research.google.com/github/blei-lab/deconfounder_tutorial/blob/master/deconfounder_tutorial.ipynb). The specified error has occurred in the line "... | https://stackoverflow.com/questions/75017585/valueerror-tape-is-required-when-a-tensor-loss-is-passed-received-loss-19 | python, tensorflow, data-science, causality | 1,672,917,320 |
se_75013800 | stackoverflow | DATA_SCIENCE | Reshaping Multi Indexed DF | Reshaping Multi Indexed DF
I have a dataframe that is structured like so (similar to a pivot table):
A
B
December 2022
January 2023
A1
B1
100
200
A1
B2
101
201
I'd like to and transpose my dataframe in a way so it reads:
Month
A
B
Value
December 2022
A1
B1
100
December 2022
A1
B2
101
January ... | https://stackoverflow.com/questions/75013800/reshaping-multi-indexed-df | python-3.x, pandas, dataframe, data-science | 1,672,892,145 |
se_75014812 | stackoverflow | DATA_SCIENCE | how to implement trained nlp spacy model in a front end application | how to implement trained nlp spacy model in a front end application
I am new to ML and DS. I have done many projects on Kaggle or Colab but this is my first time doing an NLP project on Resume Parsing using spacy.
I have trained my model using data from 200 resumes and now i have a model best and a model last
i tried ... | https://stackoverflow.com/questions/75014812/how-to-implement-trained-nlp-spacy-model-in-a-front-end-application | python, machine-learning, nlp, data-science, spacy | 1,672,901,847 |
se_75014673 | stackoverflow | DATA_SCIENCE | Imbalanced Dataset in R - ROSE package | Imbalanced Dataset in R - ROSE package
I'm working in 'German Credit Risk' dataset, and noticed that target variable is imbalanced.
I tried to use the package ROSE, though it changed the predictors variables.
ds<- data.frame(read.csv("credit.csv",header =TRUE, stringsAsFactors = TRUE))
View(ds)
library(ROSE)
ds1 <- RO... | https://stackoverflow.com/questions/75014673/imbalanced-dataset-in-r-rose-package | r, dataframe, machine-learning, data-science | 1,672,900,866 |
se_75009985 | stackoverflow | DATA_SCIENCE | 2 Counts Statements in MySQL | 2 Counts Statements in MySQL
I am trying to see the number of products sold to different companies by month and year.
For example:
I have a dataset where I have a long list of products. I would like to see two different columns where the first column shows a count of all those products and a second column that shows t... | https://stackoverflow.com/questions/75009985/2-counts-statements-in-mysql | mysql, sql, data-science | 1,672,858,450 |
se_75009464 | stackoverflow | DATA_SCIENCE | AttributeError: 'function' object has no attribute 'iterrows' | AttributeError: 'function' object has no attribute 'iterrows'
import pandas as pd
from pandas import DataFrame
import nltk
import numpy as np
from sklearn.metrics import accuracy_score
**this is the library**
df = pd.read_csv('spam.csv', encoding='ISO-8859-1')
**the dataframe**
d... | https://stackoverflow.com/questions/75009464/attributeerror-function-object-has-no-attribute-iterrows | python, pandas, function, data-science, naivebayes | 1,672,855,217 |
se_75009043 | stackoverflow | DATA_SCIENCE | CountVectorizer not working in ColumnTransformer | CountVectorizer not working in ColumnTransformer
Combining CountVectorizer() with ColumnTransformer() gives me an error. Here is a reproduced case:
from sklearn.compose import ColumnTransformer
from sklearn.feature_extraction.text import CountVectorizer
import pandas as pd
# Create a sample data frame
df = pd.DataFra... | https://stackoverflow.com/questions/75009043/countvectorizer-not-working-in-columntransformer | pandas, numpy, scikit-learn, data-science, countvectorizer | 1,672,853,009 |
se_75005117 | stackoverflow | DATA_SCIENCE | Model for predicting temperature data of fridge | Model for predicting temperature data of fridge
I set up a sensor which measures temperature data every 3 seconds. I collected the data for 3 days and have 60.000 rows in my csv export. Now I would like to forecast the next few days. When looking at the data you can already see a "seasonality" which displays the fridg... | https://stackoverflow.com/questions/75005117/model-for-predicting-temperature-data-of-fridge | python, machine-learning, data-science, prediction, forecasting | 1,672,833,536 |
se_75005433 | stackoverflow | DATA_SCIENCE | I have a pandas data frame, with a bunch of strings i want to know if i can use optimization algorithms on it | I have a pandas data frame, with a bunch of strings i want to know if i can use optimization algorithms on it
code clus_0 clus_1 clus_2
0 5 AASP_2 CCOD_1 0
1 6 AASP_2 EXTR_1 AASP_2
2 7 BBOP_2 BBOP_1 NSRS_1
3 8 DGSP_1 DVEN_1 AASP_5
4 9 DDTR_1 AASP_4 AASP_2
the data frame has this stru... | https://stackoverflow.com/questions/75005433/i-have-a-pandas-data-frame-with-a-bunch-of-strings-i-want-to-know-if-i-can-use | pandas, dataframe, data-science, query-optimization | 1,672,835,204 |
se_75003926 | stackoverflow | DATA_SCIENCE | Generate a csv dataset file which is explained from a folder structure in python | Generate a csv dataset file which is explained from a folder structure in python
I have a folder "Dataset" which contains a bunch of folders with their own names. Each folder contains n number of frames, which are sequential images. n ranges from 5-20 images. I need a python code, which iterates through all the folder... | https://stackoverflow.com/questions/75003926/generate-a-csv-dataset-file-which-is-explained-from-a-folder-structure-in-python | python, csv, machine-learning, dataset, data-science | 1,672,827,171 |
se_75001434 | stackoverflow | DATA_SCIENCE | improving my model using undersampling still has poor results in python | improving my model using undersampling still has poor results in python
I have 1 million raw data points, and I dropped 2 independent variable because the have over 80% missing value.
All my variables are categorical except for "age" which I scaled between -1 and 1. Remaining were turned into dummy variables.
i want b... | https://stackoverflow.com/questions/75001434/improving-my-model-using-undersampling-still-has-poor-results-in-python | python, machine-learning, statistics, data-science, logistic-regression | 1,672,811,742 |
se_74990512 | stackoverflow | DATA_SCIENCE | Find local maxima or peaks(index) in a numeric series using numpy and pandas Peak refers to the values surrounded by smaller values on both sides | Find local maxima or peaks(index) in a numeric series using numpy and pandas Peak refers to the values surrounded by smaller values on both sides
Write a python program to find all the local maxima or peaks(index) in a numeric series using numpy and pandas Peak refers to the values surrounded by smaller values on both... | https://stackoverflow.com/questions/74990512/find-local-maxima-or-peaksindex-in-a-numeric-series-using-numpy-and-pandas-pea | python, pandas, numpy, data-science | 1,672,732,942 |
se_74966513 | stackoverflow | DATA_SCIENCE | Extracting text data from files in different sub-directories raises "ValueError: substring not found" | Extracting text data from files in different sub-directories raises "ValueError: substring not found"
I was trying to extract text data from files in different sub-directories and put the extracted data into pandas dataframes.
An example of the text data is given below:
"EXAMINATION: CHEST PA AND LAT INDICA... | https://stackoverflow.com/questions/74966513/extracting-text-data-from-files-in-different-sub-directories-raises-valueerror | python, machine-learning, nlp, data-science | 1,672,442,266 |
se_74993022 | stackoverflow | DATA_SCIENCE | Snowflake: Populate a table with minute increments between two timestamps | Snowflake: Populate a table with minute increments between two timestamps
In Snowflake SQL, I would like to g generate a table with one column where the minimum value is the min(truncated timestamp) of another table and the maximum value is the max(truncated timestamp) of the same table.
i.e.:
table1:
| 2022-01-01 00... | https://stackoverflow.com/questions/74993022/snowflake-populate-a-table-with-minute-increments-between-two-timestamps | sql, snowflake-cloud-data-platform, data-science | 1,672,746,898 |
se_74994886 | stackoverflow | DATA_SCIENCE | I think there are repetitive combinations, no? | I think there are repetitive combinations, no?
I am reading the book Hands-on Machine Learning by Aurélien Géron, and in the second chapter at page 142 he wrote the following code about hyperparameter tuning combinations:
param_grid = [
{'preprocessing__geo__n_clusters': [5, 8, 10],
'random_forest__max_features':... | https://stackoverflow.com/questions/74994886/i-think-there-are-repetitive-combinations-no | python, machine-learning, scikit-learn, data-science | 1,672,757,040 |
se_74994113 | stackoverflow | DATA_SCIENCE | matplotlib presentation with regards to plt.show() vs semi-colon | matplotlib presentation with regards to plt.show() vs semi-colon
Not so much a problem but rather what is the 'industry standard' with regards to
plt.plot(); and plt.show() following plt.plot()?
In my experience so far, it seems plt.plot() then plt.show() seems more common, but I'm looking to draw on more experienced ... | https://stackoverflow.com/questions/74994113/matplotlib-presentation-with-regards-to-plt-show-vs-semi-colon | python, matplotlib, data-science | 1,672,752,990 |
se_74860609 | stackoverflow | DATA_SCIENCE | High accuracy training but low accuracy test/prediction | High accuracy training but low accuracy test/prediction
I am using CNN to classify apple type. I achieved high accuracy on train data but really low accuracy on test data. Data is split into 80:20. I am not sure if my data is overfitting or not.
I have 2 folders that contain TraningData and TestData, and each folder h... | https://stackoverflow.com/questions/74860609/high-accuracy-training-but-low-accuracy-test-prediction | python, validation, machine-learning, data-science, classification | 1,671,526,754 |
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_74986997 | stackoverflow | DATA_SCIENCE | Statsmodels package is not letting me inherit a function. I get unexpected keyword argument even though the function needs an input parameter | Statsmodels package is not letting me inherit a function. I get unexpected keyword argument even though the function needs an input parameter
so the way the FTestAnovaPower function works is, it takes 5 parameter but one need to be left as None and the function calculates whichever argument is left as None. My problem... | https://stackoverflow.com/questions/74986997/statsmodels-package-is-not-letting-me-inherit-a-function-i-get-unexpected-keywo | python, class, statistics, data-science, statsmodels | 1,672,693,054 |
se_74986643 | stackoverflow | DATA_SCIENCE | Data Have to year format 19 and 2019 how to convert it into a single format 2019 | Data Have to year format 19 and 2019 how to convert it into a single format 2019
I am cleaning some data working on Pandas and have one column year containing two formats of years 19 and 2019.
I am currently using pd.to_datetime(chelsea["Year"], format="%y")
it is giving me errors. Now how can I convert this column in... | https://stackoverflow.com/questions/74986643/data-have-to-year-format-19-and-2019-how-to-convert-it-into-a-single-format-2019 | python, pandas, data-science, data-cleaning | 1,672,690,252 |
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_74984374 | stackoverflow | DATA_SCIENCE | How to get a series of highest values out of equal portions of another pandas series python | How to get a series of highest values out of equal portions of another pandas series python
I am working with a series in python, What I want to achieve is to get the highest value out of every n values in the series.
For example:
if n is 3
Series: 2, 1, 3, 5, 3, 6, 1, 6, 9
Expected Series: 3, 6, 9
I have tried nlarge... | https://stackoverflow.com/questions/74984374/how-to-get-a-series-of-highest-values-out-of-equal-portions-of-another-pandas-se | python, pandas, dataframe, data-science | 1,672,674,303 |
se_74983767 | stackoverflow | DATA_SCIENCE | What is the difference between .py and .pyc files? | What is the difference between .py and .pyc files?
An interviewer asked me about this..
I tried to answer but just get confused 😕 | https://stackoverflow.com/questions/74983767/what-is-the-difference-between-py-and-pyc-files | python, data-science | 1,672,670,788 |
se_74979276 | stackoverflow | DATA_SCIENCE | Loading data for Machine learning | Loading data for Machine learning
I have a dataset with >100,000 data points. I am creating ML model and plots for subset of data every time when it meets certain condition.
Will it be better if i load the data before for loop. Or, load the data every time inside for loop.
In first case it will take less time to run "... | https://stackoverflow.com/questions/74979276/loading-data-for-machine-learning | machine-learning, data-science | 1,672,638,012 |
se_74975435 | stackoverflow | DATA_SCIENCE | Pandas column separation using .loc | Pandas column separation using .loc
I am an amateur user.
I watched many videos but I couldn't figure out this error.
How can I keep PERSON_WGHT, LOS, and IDC_DC_CD_1 as a columns for all rows that is 386816. | https://stackoverflow.com/questions/74975435/pandas-column-separation-using-loc | python, pandas, data-science | 1,672,586,483 |
se_59408057 | stackoverflow | DATA_SCIENCE | What is the preferred way to regularly export data from SAP to other software? | What is the preferred way to regularly export data from SAP to other software?
Currently, for a data science project, I have to access customer data located within an SAP system (Hana). My idea is to configure SAP so that the data is regularly exported to a folder and processed from there. For an optimal implementatio... | https://stackoverflow.com/questions/59408057/what-is-the-preferred-way-to-regularly-export-data-from-sap-to-other-software | export, data-science, hana | 1,576,752,247 |
se_74973008 | stackoverflow | DATA_SCIENCE | Which Feature Selection Techniques for NLP is this represent | Which Feature Selection Techniques for NLP is this represent
I have a dataset that came from NLP for technical documents
my dataset has 60,000 records
There are 30,000 features in the dataset
and the value is the number of repetitions that word/feature appeared
here is a sample of the dataset
RowID Microsoft In... | https://stackoverflow.com/questions/74973008/which-feature-selection-techniques-for-nlp-is-this-represent | machine-learning, nlp, data-science, feature-selection, feature-detection | 1,672,544,180 |
se_74967680 | stackoverflow | DATA_SCIENCE | Is there any R package to create the generalized box plot as mentioned in the research paper of (Bruffaerts, et al., 2014) | Is there any R package to create the generalized box plot as mentioned in the research paper of (Bruffaerts, et al., 2014)
I have a highly skewed and heavy tailed data. For this reason, instead of using the adjusted boxplot in R (which accounts only for the skewness of the data and not the underlying heaviness of the ... | https://stackoverflow.com/questions/74967680/is-there-any-r-package-to-create-the-generalized-box-plot-as-mentioned-in-the-re | r, data-science, exploratory-data-analysis | 1,672,464,236 |
se_74893218 | stackoverflow | DATA_SCIENCE | How to scrape a table from a page and create a multi-column dataframe with python? | How to scrape a table from a page and create a multi-column dataframe with python?
This website https://aviation-safety.net/wikibase/ DB begins from year 1902 to 2022.
I am trying to scrape the table, narrative, probable cause and classification for every accidents in the year 2015 and 2016: https://aviation-safety.ne... | https://stackoverflow.com/questions/74893218/how-to-scrape-a-table-from-a-page-and-create-a-multi-column-dataframe-with-pytho | python, pandas, dataframe, web-scraping, data-science | 1,671,738,504 |
se_74961042 | stackoverflow | DATA_SCIENCE | I need to make a Pre Trained Tokenizer (Hugging Face) safer for privacy | I need to make a Pre Trained Tokenizer (Hugging Face) safer for privacy
I am new to NLP and Transformers library. Perhaps my doubt is naive but I am not finding a good solution for it.
I have documents whose content in sensitive and it is a requirements of mine not to publish it clearly on cloud. However my model is r... | https://stackoverflow.com/questions/74961042/i-need-to-make-a-pre-trained-tokenizer-hugging-face-safer-for-privacy | nlp, data-science, ocr, tokenize, huggingface-tokenizers | 1,672,399,860 |
se_74955186 | stackoverflow | DATA_SCIENCE | Tensor conversion requested dtype int64 for Tensor with dtype float32 when creating CNN model | Tensor conversion requested dtype int64 for Tensor with dtype float32 when creating CNN model
I tried to create a CNN but I got an error. Could you figure out what I did wrong?
C1, C2 = tf.constant(70, dtype='float32'), tf.constant(1000, dtype="float32")
def score(y_true, y_pred):
tf.dtypes.cast(y_true, tf.float3... | https://stackoverflow.com/questions/74955186/tensor-conversion-requested-dtype-int64-for-tensor-with-dtype-float32-when-creat | deep-learning, conv-neural-network, data-science | 1,672,341,145 |
se_74959530 | stackoverflow | DATA_SCIENCE | How to compute precision,recall and f1 score of an balanced logistic regression model in python | How to compute precision,recall and f1 score of an balanced logistic regression model in python
i need my precision,recall and f1 score results to be like the output below
precision 0.98
recall 0.98
f1 score 0.93
the numbers are just an example
here is my data head
here is my code
#training and test sam... | https://stackoverflow.com/questions/74959530/how-to-compute-precision-recall-and-f1-score-of-an-balanced-logistic-regression | python, machine-learning, statistics, data-science, precision-recall | 1,672,388,639 |
se_74955875 | stackoverflow | DATA_SCIENCE | Is there any way in a Python dataframe to see if two columns are the same but with renamed values? | Is there any way in a Python dataframe to see if two columns are the same but with renamed values?
For example if I have a large dataframe of all individuals in a zoo and two columns are Animal_Common_Name and Animal_Scientific_Name. I suspect one of those is redundant as one characteristic is totally determined by th... | https://stackoverflow.com/questions/74955875/is-there-any-way-in-a-python-dataframe-to-see-if-two-columns-are-the-same-but-wi | python, pandas, dataframe, numpy, data-science | 1,672,346,424 |
se_74954492 | stackoverflow | DATA_SCIENCE | Is there any way to show the different values of all the columns of a dataframe in python? | Is there any way to show the different values of all the columns of a dataframe in python?
Let's say that you have an insanely large dataframe with several observations (rows) and labels/characteristics (columns) and the first thing you want to do is to exclude all the columns who has irrelevant informantion. For that... | https://stackoverflow.com/questions/74954492/is-there-any-way-to-show-the-different-values-of-all-the-columns-of-a-dataframe | python, pandas, dataframe, numpy, data-science | 1,672,336,404 |
se_74944314 | stackoverflow | DATA_SCIENCE | Text data extraction between keywords in a string | Text data extraction between keywords in a string
I have text data that looks like the following after extracting from a file and cleaning. I want to put the data into a pandas dataframe where the columns are ('EXAMINATION', 'TECHNIQUE', 'COMPARISON', 'FINDINGS', 'IMPRESSION'), and each cell in each row contains the e... | https://stackoverflow.com/questions/74944314/text-data-extraction-between-keywords-in-a-string | dataframe, machine-learning, nlp, data-science, data-cleaning | 1,672,256,153 |
se_74948199 | stackoverflow | DATA_SCIENCE | create a correlation matrix with a datetime type index dataset in python | create a correlation matrix with a datetime type index dataset in python
I had 2 different dataset and a merge them with:
aaa = pd.merge(time_aragonit, floridaco2, how='inner', on='Time')
This is my dataset after the merge:
enter image description here
I have datetime type index and when i want to create a correlatio... | https://stackoverflow.com/questions/74948199/create-a-correlation-matrix-with-a-datetime-type-index-dataset-in-python | python, pandas, dataframe, seaborn, data-science | 1,672,297,733 |
se_74937913 | stackoverflow | DATA_SCIENCE | Machine learning with handling features which are suppose to have missing data | Machine learning with handling features which are suppose to have missing data
I am currently working in a project for my MSc and I am having this issue with that dataset. I don't have previous experience in machine learning and this is my first exposure.
In my dataset I started doing my EDA (Exploratory Data Analysis... | https://stackoverflow.com/questions/74937913/machine-learning-with-handling-features-which-are-suppose-to-have-missing-data | machine-learning, statistics, data-science, bigdata, exploratory-data-analysis | 1,672,215,940 |
se_74233831 | stackoverflow | DATA_SCIENCE | Jupyter notebook linear regression problem | Jupyter notebook linear regression problem
in jupyter notebook when we input this we expect this output as shown in screenshot
But in my notebook when i enter same query i am getting different output why | https://stackoverflow.com/questions/74233831/jupyter-notebook-linear-regression-problem | python-3.x, jupyter-notebook, data-science, linear-regression, prediction | 1,666,951,877 |
se_67912460 | stackoverflow | DATA_SCIENCE | Get values of a column having more than a certain value for given number of times | Get values of a column having more than a certain value for given number of times
I have a dataframe dfas:
Election Year Votes Votes % Party Region
0 2000 42289 29.40 Janata Dal (United) A
1 2000 27618 19.20 Rashtriya Janata Dal B
2 2000 ... | https://stackoverflow.com/questions/67912460/get-values-of-a-column-having-more-than-a-certain-value-for-given-number-of-time | python, pandas, dataframe, data-science | 1,623,278,024 |
se_74908086 | stackoverflow | DATA_SCIENCE | How to fill null values in a an aggregated table with Pandas? | How to fill null values in a an aggregated table with Pandas?
I have a csv file called purchases.csv and I am trying to find how many purchases of each item in a month and every month seperately. I found every month seperately and how many purchases of each item. But if a item is never got purchased that month I need ... | https://stackoverflow.com/questions/74908086/how-to-fill-null-values-in-a-an-aggregated-table-with-pandas | python, python-3.x, pandas, dataset, data-science | 1,671,889,940 |
se_63115880 | stackoverflow | DATA_SCIENCE | Output image of CNN autoencoder is white | Output image of CNN autoencoder is white
I'm having trouble training an autoencoding CNN. My objective is to cluster document images (receipts, letters, etc.) in an unsupervised fashion (btw do you have other algorithms besides autoencoders for this?).
So I tried to do an autoencoder, and I'm always getting weird deco... | https://stackoverflow.com/questions/63115880/output-image-of-cnn-autoencoder-is-white | tensorflow, machine-learning, keras, data-science, autoencoder | 1,595,854,822 |
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_74937376 | stackoverflow | DATA_SCIENCE | Predict Future values Using LSTM | Predict Future values Using LSTM
I have dataset with data from 2019 to 2022, and I want to predict values for the years 2023 to 2025
2019-01-31 11286
2019-02-29 11182
2022-07-31 11286
2022-08-31 11182
2022-09-30 12023
2022-10-31 33200
2022-11-30 31228
Calling df.info() out... | https://stackoverflow.com/questions/74937376/predict-future-values-using-lstm | python, data-science, predict | 1,672,212,195 |
se_67953527 | stackoverflow | DATA_SCIENCE | pandas.interpolate doesn't give wanted result | pandas.interpolate doesn't give wanted result
i'm trying to fill the empty y field in my dataset[from 12 to 16]
, here is the original data vizualisation
I have NaN values at the end, here is my code
df=df.interpolate(method='polynomial', order=2, limit_direction ='both')
I have tried many methods (‘slinear’, ‘... | https://stackoverflow.com/questions/67953527/pandas-interpolate-doesnt-give-wanted-result | python, pandas, data-science, interpolation | 1,623,537,909 |
se_74932736 | stackoverflow | DATA_SCIENCE | Comparing row values in a dataframe | Comparing row values in a dataframe
Ok so I'm trying to solve a challenge that says I have to add weight to a graph's edges.
I am open to choosing what ever I want as my weight and I choose to add 1 each time I found a duplicated row in the Data frame.
The problem is as in this data set: https://www.kaggle.com/dataset... | https://stackoverflow.com/questions/74932736/comparing-row-values-in-a-dataframe | python, pandas, dataframe, data-science | 1,672,164,490 |
se_74924763 | stackoverflow | DATA_SCIENCE | Tensorflow misclassification problem. All cases are assigned to one class | Tensorflow misclassification problem. All cases are assigned to one class
I would like to build a tensorflow model to categorize loans for credit risk.
Unfortunately, I have a problem cause my model puts all cases into one class.
I don't know if it comes from the definition of metadata in specify_feature_usages functi... | https://stackoverflow.com/questions/74924763/tensorflow-misclassification-problem-all-cases-are-assigned-to-one-class | python, tensorflow, machine-learning, data-science, tensorflow2.0 | 1,672,098,740 |
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_71594551 | stackoverflow | DATA_SCIENCE | How can I fix for unhashable type series problem | How can I fix for unhashable type series problem
The following code has generated this error message:
(dd
[['cfs']]
.loc['2018/3':'2019/5']
.query('cfs.isna()')
)
--->TypeError: unhashable type: 'Series'
Can somebody help me in figuring out the problem? | https://stackoverflow.com/questions/71594551/how-can-i-fix-for-unhashable-type-series-problem | python, pandas, numpy, time-series, data-science | 1,648,072,646 |
se_74924942 | stackoverflow | DATA_SCIENCE | How to extract data from this .txt files and put the data into pandas dataframe by columns (like 'Report', 'Findings', 'Impression', 'Recomendation') | How to extract data from this .txt files and put the data into pandas dataframe by columns (like 'Report', 'Findings', 'Impression', 'Recomendation')
Radiology Report
I am trying to extract the data by the subject ('findings', 'impression') and trying to put it on pandas dataframe | https://stackoverflow.com/questions/74924942/how-to-extract-data-from-this-txt-files-and-put-the-data-into-pandas-dataframe | machine-learning, nlp, data-science | 1,672,101,631 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.