I have 2 data frames with identical columns. Column 'key' will have unique values. Data frame 1:- A B key C 0 1 k1 2 1 2 k2 3 2 3 k3 5 Data f
I want to read in a very large csv (cannot be opened in excel and edited easily) but somewhere around the 100,000th row, there is a row with one extra column ca
Having a series like this: ds = Series({'wikipedia':10,'wikimedia':22,'wikitravel':33,'google':40}) google 40 wikimedia 22 wikipedia 10 wikitra
This code generates error: IndexError: invalid index to scalar variable. at the line: results.append(RMSPE(np.expm1(y_train[testcv]), [y[1] for y in y_test])
I have a problem viewing the following DataFrame: n = 100 foo = DataFrame(index=range(n)) foo['floats'] = np.random.randn(n) foo The problem is that it does
I have a folder with a bunch of dbf files I would like to convert to csv. I have tried using a code to just change the extension from .dbf to .csv, and these f
I want to use S&P500 company information to calculate an index. However, the companies in S&P500 changes frequently, I want to know the constituents for
I am trying to resample to monthly values but with respect to 15th day I checked the timeseries offsets documentation but there is only M month end frequenc
We are returning paths from a cypher query using py2neo. We would like to parse the result into a Pandas DataFrame. The cypher query is similar to the followin
How do I find all rows in a pandas DataFrame which have the max value for count column, after grouping by ['Sp','Mt'] columns? Example 1: the following DataFram
I have a dataframe with data like the sample data below. I'm trying to create dummy variables for the values in the categories field using get_dummies but I'm
I have a pandas dataframe with datetime index Date 2013-02-22 00:00:00+00:00 0.280001 2013-02-25 00:00:00+00:00 0.109999 2013-02-26 00:00:00+00:00 -0.
I want to merge 2 columns of the same dataframe, and add a duplicate row using the same values as it has in the other columns. consider the following dataframe:
I've been trying to use the packages pandas, numpy, matplotlib, seaborn in my "Visual Studio Code", but the program keeps showing me the following message: "im
I have the following dataframe: 0 1 0 enrichment_site value 1 last_updated value 2
Given a dataset with the following structure: time var1 var2 var2 var1 var3 loc1 loc1 loc2 loc2 loc1 1 11 12 13 14 15 2 21
Given a dataset with the following structure: time var1 var2 var2 var1 var3 loc1 loc1 loc2 loc2 loc1 1 11 12 13 14 15 2 21
I am writing to an excel file using an ExcelWriter: writer = pd.ExcelWriter(fn,datetime_format=' d hh:mm:ss') df.to_excel(writer,sheet_name='FOO') The writi
I want to scale a dataframe, which raises the error as in the title (or below). My data: df.head() timestamp open high low close volume 0 2020-06-2
I have a simple DataFrame like the following: I want to select all values from the 'First Season' column and replace those that are over 1990 by 1. In this e