Questions tagged [reindex]
459 questions
1
vote
1 answer
Manipulating indices in a pandas dataframe
The problem:
I want to shift the index by adding 2 (index+=2) to match it with the indices of a .csv file.
I have a dataframe which looks as…

philiVanilli25
- 13
- 3
1
vote
2 answers
Reindexing Pandas based on daterange
I am trying to reindex the dates in pandas. This is because there are dates which are missing, such as weekends or national hollidays.
To do this I am using the following code:
import pandas as pd
import yfinance as yf
import datetime
start =…

Slartibartfast
- 1,058
- 4
- 26
- 60
1
vote
2 answers
Add different prefix to index by column value in pandas dataframe
I have a dataframe, with duplicated index, which I'm trying to reindex according to rowname of another dataframe. However, due to the duplicated index problem it's telling me cannot reindex on an axis with duplicate labels when I do df2 =…

Joy Zheng
- 49
- 6
1
vote
1 answer
Reindex selected _source fields using Rest high level client in java
I want to re_index only selected fields from my document in elasticsearch using Rest High level client.
I know the elasticsearch query to achieve that but I don't know it's equivalent query using rest client.
Following is the elasticsearch query…

Aman Mehta
- 303
- 1
- 12
1
vote
1 answer
Pandas resample with multiindex start- and enddate
Suppose I have a multi-index Pandas data frame with two index levels: month_begin and month_end
import pandas as pd
multi_index = pd.MultiIndex.from_tuples([("2022-03-01", "2022-03-31"),
("2022-04-01",…

W. Walter
- 337
- 1
- 10
1
vote
1 answer
Reindex Magento 2 with morethan 500000 products
I have a website having more than 500000 products, but as the product count is much higher than usual I cannot do the reindexing successfully.
Getting the timeout error on SSH. Reindex mode is set to Update By Schedule.
How do I run the reindex in…

Sandeep Nair
- 21
- 3
1
vote
1 answer
Editing and re-indexing large amounts of data in elasticsearch (millions of records)
I recently made a new version of an index for my elasticsearch data with some new fields included. I re-indexed from the old index, so the new index has all of the old data with also the new mapping to include the new fields.
Now, I'd like to update…

jerfp
- 417
- 5
- 13
1
vote
1 answer
Pandas reindex to higher resolution
I have a pandas dataframe with index 3 to 15 with 0.5 steps and want to reindex it to 0.1 steps.
I tried this code and it doesn't work
# create data and set index and print for verification
df =…

Ricardo
- 350
- 1
- 10
1
vote
1 answer
Python: concat rows of two dataframes where not all columns are the same
I have two dataframes:
EDIT:
df1 = pd.DataFrame(index = [0,1,2], columns=['timestamp', 'order_id', 'account_id', 'USD',…

MathMan 99
- 665
- 1
- 7
- 19
1
vote
1 answer
create user defined id and new data at time of reindex elasticsearch
I am going to reindex with below query like.
{
"source": {
"index": "demodata"
},
"dest": {
"index": "new_twitter",
"op_type": "create"
},
"script": {
"source": "ctx._source['project'] = 'Personal3'",
"lang":…

Janny
- 681
- 1
- 8
- 33
1
vote
1 answer
Sorting Dataframe Columns By Alphabetical & Numerical Order
I would like to re-index the columns of a dataframe by sorting them by both alphabetical order and numerical order.
In my dataframe df, my columns are named:
Round 1 Position, Round 2 Position, Round 1 Score, Round 2 Score, Round 1 Price, Round 2…

Fonti
- 133
- 1
- 9
1
vote
1 answer
Server is timing out because of Sunspot-Solr reindex'ing problem
Not too sure how to debug this. Any tips would be greatly appreciated.
Basically, I just did a large commit, and now my server can't boot up because of a Sunspot-solr issue.
I notice it when I try to manually reindex.
This is the return :
Processing…

Trip
- 26,756
- 46
- 158
- 277
1
vote
1 answer
Normalizing a data set to look for seasonalities and average python pandas
Using a data set, I wanted to reindex the below around a center date using pandas. For instance, on the first data set I would like to generate an index around 12/22/2009 and give it the value 0 and anything before would be -1,-2,-3,-4 etc and after…

user3757405
- 51
- 1
- 8
1
vote
0 answers
Automatic database reindexing in Gitlab not working
We have made Automatic database reindexing in Gitlab,with below property
gitlab_rails['database_reindexing']['enable']=true
gitlab_rails['database_reindexing']['hour'] = '*'
gitlab_rails['database_reindexing']['minute'] =…

praseeb kdas
- 37
- 8
1
vote
1 answer
Python Fill in missing dates for grouped IDs, where each ID has it's own min and max date
Hey I have seen a lot of issues answered where the max and min date is constant accross the output. But what about filling in dates for each ID where you only what to fill between each IDs max and min date.
Say for example this is the dataframe
x =…

dataaltorabbit
- 13
- 3