427 questions
0
votes
1
answer
202
views
When should I use .copy() after filtering a DataFrame in pandas? [closed]
I am working on a project where I frequently filter my DataFrame and then return it for further processing. For example, in one file I have this code:
df = df[df['Ticker'].str.startswith("...
0
votes
1
answer
46
views
How to write a database query in Node.js/MongoDb using regex that returns a result when a field starts with a given string? [duplicate]
So far I have this code, that attempts to remove a "document" (a path string, like "./documents/images") from a database, as well as all subdocuments (path strings that start with ...
2
votes
1
answer
67
views
Why does StartsWith("⏸") return true when the string is "<mn" in ASP.NET but not in desktop apps?
I'm experiencing an inconsistent behavior between a desktop .NET application and a web-based ASP.NET application (running under Visual Studio).
In both, I use the same regular expression:
Dim mStart ...
1
vote
3
answers
123
views
Is there a way to find files that don't start with a certain string?
I'd like to try and pull all files in my working directory that don't begin with the string "CONVERTED" -- so I'd like for list.files() to find "x.csv" but not "CONVERTEDx.csv&...
0
votes
1
answer
151
views
Does slicing in startswith and endswith make the time complexity O(n² * m) {where m is the average length of string in the list}, or is it O(n²)?
class Solution:
def countPrefixSuffixPairs(self, words: List[str]) -> int:
n = len(words)
count = 0
for i in range(n):
for j in range(i+1, n):
...
1
vote
1
answer
153
views
How to use .fieldname to jq's startswith
In the jq script below I want to print either the concatenation of the first_name and the last_name or just the last_name.
$ echo '{"first_name": "John", "last_name": &...
-3
votes
1
answer
56
views
Find cookie name from beginning
I need to find cookie name and i try to use
import Cookies from "js-cookie"
const regexp = /^commercelayer_order-id/;
const orderId = Cookies.get(regexp)
i am stuck
I ve tried several ways ...
3
votes
3
answers
362
views
Removing columns which start with XXX and meet a criteria
Objective: Remove columns if their name starts with XXX and the rows meet a criteria. For example, in the dataset below, remove all "fillerX" columns which only contain zeros.
Data:
iris %&...
0
votes
1
answer
72
views
Dataframe from wide to long output
original wide data frame mean_SRBD:
I have a data frame (mean_SRBD). The measurement moments (day 1, day 2, day 3) are included in the suffix of the variables (-D1 = day 1, -D2 = day 2). I want to go ...
1
vote
1
answer
113
views
How to set "not Starts with" in Odoo Mailing List filter?
I have a dynamic Mailing List in Odoo version 15.0+e
and I want to exclude all the contacts where Zip code starts with K.
Using debug mode, I set the code in Editor according to this as the following:
...
0
votes
2
answers
40
views
Filtering dictionary elements by few initial values [closed]
I have the following data structure:
Clients= {
"data": [
{
"nClients": 3
},
{
"name": "Mark",
"...
-1
votes
1
answer
80
views
Can i combine contain and startswith in order to match two columns from one dataframe to another's master column?
Master dataframe filled with a specific match's players and statistics.
34 columns and variable number of rows.
Column "Player" has full names
Player
Goals
Assists
Dominic Calvert-Lewin
1
1
...
-1
votes
3
answers
107
views
How to delete CELLS and shift to right in Pandas Dataframe
So I have a below table
P Q R
| -------- | --------| --------
| Performan| Dispite | Cammmr
| Dispo | camera | battery
| Perfumo | Displu | Cammmmt
| Disper | ...
0
votes
3
answers
83
views
R - calculate proportions across columns with common prefix
I have a dataframe with 37 columns in it, with a representative sample, df below
df <- structure(list(irm = 201201:201202, trans11 = c(379L, 433L),
trans12 = 4:3, trans13 = 5:4, trans14 = c(...
1
vote
3
answers
2k
views
How to use Where-Object with StartsWith to filter Powershell command outputs
I have a powershell script written by somebody else that makes use of uses the output of a command to filter and extract the results. I think I understand what it is attempting to do but not why I am ...