Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
-1 votes
1 answer
45 views

const cart = ["shoes","shirts","boxers","pants"] function creatOrder(cart){ return new Promise((resolve,reject)=>{ if(!ValidateCart(cart)){ ...
0 votes
0 answers
20 views

My background is in SQL and I was wondering what was the most efficient/readable way of creating multiple columns using the same window partition within a pandas chain. Suppose I have the following ...
2 votes
2 answers
109 views

I am aware that I can use method chaining by simply having methods return self, e.g. object.routine1().routine2().routine3() But is it possible to organize methods into layers or groups when applying ...
0 votes
0 answers
48 views

I'm building my own ORM in Python and ran into an issue. I want to track the access to class variables in order to know which ForeignKey is being used in each part of my code. class IQuery(ABC): &...
0 votes
2 answers
194 views

I often want to both manipulate and display a dataframe during a sequence of chained operations, for which I would use*: df = ( df #Modify the dataframe: .assign(new_column=...) #View result ...
2 votes
0 answers
68 views

What is the preferred syntax to filter a polars Series without referencing the Series explicitly? I.e. something that works with method chaining. I thought pipe would be an option but it is not ...
1 vote
0 answers
110 views

After I've concluded a block with method chaining, VSCode keeps the indentation until I format on save. Example: $orders = Order::paid() ->notShipped() ->get(); dd($orders); // <-...
0 votes
1 answer
52 views

I know of 2 ways that are not very convenient and look inelegant: Via then: (new TestClass).syncMethod().asyncMethod().then(self => self.anotherSyncMethod()) Via await: (await (new TestClass)....
1 vote
4 answers
227 views

I am working in C#. And I have a scenario as shown here: var response1 = service.AddSchool(object model, string a); if (response1.StatusCode == HttpStatusCode.OK) { var response2 = service....
0 votes
1 answer
59 views

I'm working on a Python project that involves processing large numpy arrays using a chain of transformations. I've implemented two classes: Sample for individual arrays and SampleCollection for ...
3 votes
2 answers
295 views

When writing a program, I often want to perform a series of steps on a piece of data (usually a list or string). For example I might want to call a function which returns a string, convert it to a ...
1 vote
4 answers
132 views

I have a chain of methods that treat an array. Then I was trying to do a simple thing: add an element at the start of the array in a method chain. Initially I tried: console.log( [1, 2, 3] ...
1 vote
1 answer
419 views

I noticed that it's possible to use df.rename(columns=str.lower), but not df.rename(columns=str.replace(" ", "_")). Is this because it is allowed to use the variable which stores ...
1 vote
2 answers
280 views

I am coming to Python from F# and Elixir, and I am struggling heavily in terms of cleanly coding data transformations. Every language I have ever used has had a concept of a pipeline operator and/or ...
2 votes
5 answers
85 views

I have a dataset: import pandas as pd data = [ ('A', 'X'), ('A', 'X'), ('A', 'Y'), ('A', 'Z'), ('B', 1), ('B', 1), ('B', 2), ('B', 2), ('B', 3), ('B', 3), (...

15 30 50 per page
1
2 3 4 5
...
45

AltStyle によって変換されたページ (->オリジナル) /