Questions tagged [reindex]

459 questions
1
vote
1 answer

Remove key from mixed array and reindex

I am new to postgresql with php. I get below array using pg_fetch_array() function. Array ( [0] => [name] => [1] => 1 [status] => 1 [2] => C2005 [code] => C2005 ) after removing index 1 and value of key status, i have to…
deltaforce
  • 85
  • 1
  • 1
  • 11
1
vote
1 answer

How to fill in a dataframe with values from file

I have created a data frame with columnnames and rows. For example a b c d 1 Nan Nan Nan Nan 2 Nan Nan Nan Nan 3 Nan Nan Nan Nan Now, I want to fill in the dataframe with values from a tsv file. My file is as follows: 1 b 80 2 c 90 3…
Gravel
  • 365
  • 1
  • 5
  • 19
1
vote
1 answer

Python - Restructure Dataframe, move column names to rows, reshape dataframe

I need to transform df1 to df2: import pandas as pd from pandas import DataFrame, Series import numpy as np df1 = pd.DataFrame(index=['date_1', 'date_2', 'date_3'], columns=["A_count", "A_dollar", "B_count", "B_dollar"], …
DanZimmerman
  • 1,626
  • 6
  • 23
  • 45
1
vote
2 answers

reindex while converting a string value of a specific field (present in old index) into a number field value (in the new index)

Could I ask, how could I reindex while converting a 'string' field e.g. "field2": "123.2" (in old index documents) into a float/double number e.g. "field2": 123.2 (intended to be in the new index) ? This post is the closest I could get, but I do not…
leeway
  • 11
  • 1
  • 2
1
vote
1 answer

How can I delete my entire Elasticsearch db and resend all the logs?

I've got ELK + filebeat installed and I have recently started filtering my syslogs differently with a SYSLOG5424LINE logstash filter, since the syslog priority was defaulting to notice. This created some new indices in my syslog documents in…
Celi Manu
  • 371
  • 2
  • 7
  • 19
1
vote
1 answer

pandas reindexing error while using loc to create a new data frame

There are many questions on re indexing, I tried the solutions but they dint work for my code, may be i got something wrong, I have a data set with two variables patnum(ID), vrddat(Date) and I'm using below code to get the data frame after applying…
Haritha
  • 641
  • 2
  • 7
  • 12
1
vote
1 answer

Magento 2 Products not found during Catalog Search reindex

We are working on Magento 2.1.0 We are facing an issue of no products found during catalog search reindexing. As we have a large catalog, this process is taking a good time to get completed and during that time website is not showing any…
1
vote
1 answer

Adding missing dates to dataframe using reindex replaces data

I am trying to add missing dates to my dataframe. I have seen this posts: reindex and reindex2. When I try to reindex my dataframe: print(df) df = df.reindex(dates, fill_value=0) print(df) I get the following output: _updated_at Name …
archienorman
  • 1,434
  • 3
  • 20
  • 36
1
vote
1 answer

What is a pythonic way of populating in a dataframe from a csv file that has only few rows?

I have a csv file that has only the two following rows: ID CODE DATE STARTDATE AVERAGE1 AGGREGATE MEDIAN1 MEDIAN2 AVERAGE2 AVERAGE3 POSITION 123 112 2016OCT25 2016OCT25 821 3 …
Ruffy26
  • 109
  • 1
  • 12
1
vote
0 answers

MySQL auto_inc reindex with foreign key

I have 2 tables, A and B. A and B are have three columns. Here is the structure of A: id,name,phone Here is the structure of B: id,Aid,name The "Aid" is related to "id" of table A. you know, foreign key. The "id" of table A is auto_inc, but I want…
1
vote
0 answers

getting "ValueError: cannot reindex from a duplicate axis" but axis has no duplicates

I am just learning python and run into a question. Any help is appreciated. So I am trying to Interpolating one time series onto another in pandas. To do this, I need to reindex a concatenated dataframe.…
sw007sw
  • 161
  • 1
  • 5
1
vote
2 answers

reindex some DataFrame columns to multi index

At some point in my workflow I end up with a regular pandas DataFrame with some columns and some rows. I want to export this DataFrame into a latex table,using df.to_latex(). This worked great, however, I know want to use multicolumn where some…
Nras
  • 4,251
  • 3
  • 25
  • 37
1
vote
1 answer

Showing empty rows when using `reindex`

I'm having some difficulties using reindex() to count various combinations in my DataFrame. The code below reproduces my problem: a = [ ['Brand A' if i==0 else 'Brand B' for i in np.random.randint(0,2,size=(100,))], ['Type 1' if i==0 else…
Diziet Asahi
  • 38,379
  • 7
  • 60
  • 75
1
vote
2 answers

Are PostgreSQL tables automatically re-indexed after an update?

If I index a PostgreSQL table and then update it, do I need to re-index the table or is it automatically re-indexed? Can someone provide a link to PostgreSQL documentation for further reading? I've got this so…
Alan Kavanagh
  • 9,425
  • 7
  • 41
  • 65
1
vote
0 answers

Titan graph database re-indexing procedure

I have used Titan graph database with Cassandra and Solr in production environment. Currently our application is deployed and minor down-time is acceptable. Unfortunately due to some changes in schema we need to re-index the whole Titan graph…
Ali
  • 1,759
  • 2
  • 32
  • 69