Category "indexing"

Python: find the start index of a specific word number in a string

I have this string: myString = "Tomorrow will be very very rainy" I would like to get the start index of the word number 5 (very). What I do currently, I do sp

Why there's no Int Index for Set struct in Swift?

I know that Strings in Swift don't have Int indices as Swift supports Grapheme Clusters. But, when coming to Collections in Swift, Array supports Int indices bu

Excel Index / vlookup between varied row amounts

I am trying to use a vlookup / index to pull some numbers. Sample data attached: A: merged cells (the number is stored in the top of cell of the merge) B: Only

Vlookup for duplicate status

I've been looking for different approaches to fix my problem, whether it's with vlookup, index, index /match but couldn't figure it out yet. I'm trying to list

Why the indexes not speeding up the query?

I have the following query: SELECT TOP 1000 * FROM MyTable WHERE Status = 'N' AND Type is not null ORDER BY mytable.id MyTable has 130 million rows. I also

How do I create full path given index level and corresponding folder name?

In Excel, I have index levels (1, 1.1, 1.2, 1.2.1, 2, etc.) and corresponding folder name. I want a function to be take each level and concatenate corresponding

extract longest non NaN sequence from array

I want to extract the longest sequence of consecutive non NaN values from an array in Python. So from this one: a = [NaN, NaN, NaN, 1, 4, NaN, NaN, NaN, 4, 6, 8

How to match Datetimeindex for all but the year?

I have a dataset with missing values and a Datetimeindex. I would like to fill this values with the mean values of other values reported at the same month, day

Google Indexing + Yoast SEO Media Attachments

I have ~300 pages on my website so when I saw my index on Google Search Console, I knew something was wrong. I believe I suffered from the Yoast SEO bug on Word

Im getting a different output than expected when using df.loc to change some values of the df

I have a data frame, and I want to assign a quartile number based on the quartile variable, which gives me the ranges that I later use in the for. The problem i

how to convert the dictionary string to dictionary int?

A = {'1': '[1,2]', '2': '[3,4]', '3': '[5,6]', '4': '[7,8]', '5': '[9,10]' } B = {'1': '70', '2': '70', '3': '70', '4': '70', '5': '70' } How to convert this m

IndexError: list index out of range in for loop

I write a code in python but I faced this error : if a1[i] == a1[i+1] == a1[i+2]: IndexError: list index out of range I write an if condition that if my list l

PostgreSQL Nested Loop Join Performance

I have two tables exchange_rate (100 Thousand Rows) and paid_date_t (9 million rows) with below structure. "exchange_rate"

The dimension orders of the Numpy 3D array are designed to z, x, y. Are there any advantages?

I think that the x,y,z order is more intuitive for a 3D array, just as Matlab does. For example, If someone tells me an array is 2x3x4, I will think it is 2 row

Slow MySQL query on 2mill record table despite indexes

Struggling to understand why my query is taking ~8-12s to complete when my table has millions of rows. I can force it to use a specific index, and depending on

Julia: how to index an 'any' type array

I am new in Julia. I want to replicate the results in Wollmann (2019). However, it always give me this error: LoadError: MethodError: no method matching setinde

RangeIndex object is not callable

I am reading values from text file and and trying to find index of sub strings like below df=pd.read_csv('break_sent.txt', index_col=False,encoding='utf-8',del

Get index size on each shard?

I have a compound index on a sharded cluster living on Mongo Atlas. The Atlas UI tells me the index size is 10.1GB. Similarly, MongoDB Enterprise > db.myColl

Why does my =MATCH formula give #N/A or the correct answer in the exact same circumstance?

I'm trying to find the column number using a =match formula. In particular I am looking for a result of 42. As you can see, the formula looking in row 16 finds

Rationale of Rails 5 Join Table Generated Defaults

The Rails 5 command rails g migration create_foo_bar_join_table generates the following migration: class CreateFooBarJoinTable < ActiveRecord::Migration[5.0]