Ordered List RST - text

I want do create a list in RST like this:
1. text1
2. text2
3. text3
Text...
Text..
4. text4
5. text5
But for some reason, the resulting text shows 1. and 2. instead of 4. and 5. It's starting a new list, even thougt I wrote 4. and 5. How to solve this?

Related

How delete singel word from dataframe except few define words like *when what*

How delete singel word from dataframe except few define words like when what
1. Hello
2. My name is khan
3. When
4. What
5. Opted bat
6. Learn
I want output like
2. My name is khan
3. When
4. What
5. Opted bat
Use boolean indexing with filtering multiple words chained by bitwise OR with mask for filtering words defined in list:
words = ['When','What']
df = df[(df['col'].str.split().str.len() != 1) | df['col'].isin(words)]
print (df)
col
1 My name is khan
2 When
3 What
4 Opted bat
If words are defined lowercase in list:
words = ['when','what']
df = df[(df['col'].str.split().str.len() != 1) | df['col'].str.lower().isin(words)]

Excel, i have a big list (44000 records), i would like to sepperate them into 2 lists, 1 with unique values and 1 with duplicate value's

My list looks somewhat like this:
1. Unique1
2. double1
3. double2
4. unique2
5. double1
6. unique3
7. double2
8. unique4
9. double3
10. double4
and so on..
My wanted output:
list 1
1.unique1
2.unique2
3.unique3
4.unique4
list 2
1.double1
2.double2
3.double3
4.double4
I've only found things like remove/hilight duplicates or count/hilight unique values. But I need to display the values in another list.
Make a PivotTable out of the data. Put the field of interest in it as both a Row Field and as a Values field, and make sure that the aggregation being applied is a Count. (It will be by default if your things are text).
Anything with a Count of 1 is unique. Anything with a count > 1 is not.
You can then optionally copy the PivotTable, and set a Values filter to show where the count = 1 in one, and count > 1 in the other, like so:

How to count a keyword in a series of text strings within multiple cells in Excel?

I've found similar ideas on here by using SEARCH or FIND in Excel, but those seem to be more about finding the location of the keyword, rather than counting how many times it comes up.
I have a CSV of a shot list. Each shot is associated with a sequence, and each shot has a set of "tags" (this is the text string). Please see below for an example:
There are two main keywords I'd like to keep track of: "dog" and "fox". There are multiple shots per sequence, and my goal is to figure out how many shots per sequence have the "dog" tag and how many have the "fox" tag. The formula I need would be for the columns highlighted yellow, and I have manually entered the first few entires to give an idea of what number should be there. Once those are filled in, I can then count the ratio per sequence of which ones are tagged more for "dog" or "fox".
I can't use text-to-columns in Excel to easily break down the text string column, because each one contains a different series of tags (somewhat demonstrated by my sample text).
I've figured out a simple formula to count what I want if the text column only had "dog" or "fox" in it, but I can't figure out how to get Excel to find one word within a text string and count it.
=SUMIFS(D:D,B:B,1,F:F,"dog")
1 being the sequence number, and the rest of the columns are referencing my larger data sheet.
Any help would be much appreciated!!
Edit:
Sheet in text form here (sorry about formatting, cant upload a file from work ATM):
COUNTER SAMPLE DATA
Sequence Total Fox Total Dog Total Entries Ratio Fox Ratio Dog Sequence Shot Text
1 2 2 4 0.5 0.5 1 mov_101 The quick brown fox
2 3 2 5 0.6 0.4 2 mov_102 jumps over the lazy dog
3 4 3 mov_103 The fox and the hound
4 2 4 mov_104 fox news
5 3 5 mov_105 I am a dog
1 mov_106 The fox and the hound
2 mov_107 jumps over the lazy dog
3 mov_108 The fox and the hound
4 mov_109 jumps over the lazy dog
5 mov_110 I am a dog
1 mov_111 jumps over the lazy dog
3 mov_112 The fox and the hound
5 mov_113 The fox and the hound
2 mov_114 jumps over the lazy dog
2 mov_115 fox news
1 mov_116 I am a dog
3 mov_117 I am a dog
2 mov_118 The fox and the hound
You were close, you need to use COUNTIFS instead of SUMIFS to get the count of sequences. And use "*" around word fox and dog to consider surrounding words.
Here is the formula that I've used to get fox count:
=COUNTIFS($H:$H,$A2,$J:$J,"*fox*")
Place this formula in cell B2 and drag it down.
Same way, following formula will get you the dog count per sequence:
=COUNTIFS($H:$H,$A2,$J:$J,"*dog*")
Place this formula in cell C2 and drag it down.
So I tried to replicate your data and this is what I've used:
Let me know if you have any doubts.
Someone will probably have a better solution than this, but I've used it before when looking for a similar function and couldn't find one.
=(LEN([textcell]) - LEN(SUBSTITUTE([textcell], [wordcell], ""))) / LEN([wordcell])
What this does is compare the length of the original string, with the length of the string with the search word removed. Dividing it by the length of the word, giving you how many occurrences were removed.
So given the following content :
fox dog search
1 0 The quick brown fox
0 1 jumps over the lazy dog
The formula on A2 is
=(LEN($C2) - LEN(SUBSTITUTE($C2,A$1, ""))) / LEN(A$1)
Dollar signs not required, but made it so I could copy the formula to all 4 cells.
If your Sequence column is E, and the column with text is F, you could use this formula:
=SUMPRODUCT(--(NOT(ISERROR(SEARCH(B$1,$F$2:$F$6)))),--($E$2:$E$6=$A2))
This creates two arrays, one that's a sequence of 1's and 0's where 1 is that the text contains B1 ("fox" or "dog"), and another that is 1 for sequence matching and 0 for not sequence matching.
Then it multiplies and sums the arrays so you only get the count of when both conditions match.
The formula is in cells B2:C3 in my example:
Picture of sample data I used:

Remove exact text in Cell A if it exists in Cell B

I have two Excel columns:
First column
1. Dog
2. Gorilla
3. Lion
Second column
1. Dog; Monkey; Fish
2. Insect; Cobra
3. Lion; Cat
What I want is removing the duplicate from column 2, so if it is in Column A it must be removed:
1. Monkey; Fish
2. Insect; Cobra
3. Cat
Who can help me?
Try this:
=SUBSTITUTE(TRIM(SUBSTITUTE(SUBSTITUTE($B1,$A1,""),";",""))," ","; ")
EEM, that did the trick! Only all semicolons are now gone, but that can be fixed i think. Thanks!

Excel formatting

I have a spreadsheet with text in column A.
For example
A1=MY TEXT1
A2=MY TEXT2
A3=MY TEXT3
A4=MY TEXT4
A5=MY TEXT5
I want to add an apostrophe to the front and back of the text
Result to be:
B1='MY TEXT1'
B2='MY TEXT2'
B3='MY TEXT3'
B4='MY TEXT4'
B5='MY TEXT5'
It seems like a straight forward thing to do. Any one know how?
Use this formula:
="'" & A1 & "'"
=CONCATENATE("'";A1;"'")

Resources