Questions tagged [multiple-columns]

Multiple-columns are when text is split into a number of parallel text columns, rather than one column of text. For CSS Multicolumn layout, use the [css-multicolumn-layout] tag.

Multiple-columns are often found in newspapers and magazines, where a single column of text would create a line length longer than the ideal width of optimal readability.

Text can be set to use multiple-columns in CSS by using the CSS Multiple-column layout module.

5872 questions
1
vote
2 answers

Selecting value of column based on the values in another column, then applying the value at each row in pandas dataframe

I have to calculate the value of S, which has the formula as: S = (25400/CN) − 254 the CN value which I have to choose will depend on the amc_active condition viz 1, 2 and 3. if amc_active condition at 'index 0 or 1st row' is 1 then I have to choose…
1
vote
3 answers

Weighted Mean as a Column in Pandas

I am trying to add a column with the weighted average of 4 columns with 4 columns of weights df = pd.DataFrame.from_dict(dict([('A', [2000, 1000, 2509, 2145]), ('A_Weight', [37, 47, 33, 16]), …
1
vote
1 answer

Extract unique value with multiple columns from DataFrame

I have a dataframe where I want to extract values from two columns but the criteria set is unique values from one of the columns. In the image below, I want to extract unique values of 'education' along with its corresponding values from…
HoppyHOP
  • 19
  • 3
1
vote
2 answers

Using par(new=T) in loops: different colors?

I wanted to use par(new = TRUE) to plot my plots which were generated in a loop over another. But how do I make sure, that every new plot has a another color? It is all black and overlayed now, so that I cannot distinguish the plots anymore: for(i…
cel
  • 15
  • 3
1
vote
1 answer

searching not null condition in multiple columns with query postgresql

I want to count how many document that does not have date in field1, field2, field3, and field4. I have created the query as below but it does not really look good. select count(doc) where true and field1 is not null and field2 is not…
nomnom3214
  • 227
  • 1
  • 11
1
vote
1 answer

append all the columns into one column in DAX?

I have a large data set with a single date index and I need to append all the columns into a single one using the same date index. i'm on a plain excel file with power query / dax (No Power Bi). Example: index Col 1 ... Col…
Atlahua
  • 23
  • 5
1
vote
5 answers

Bash script: generate 2 columns from a sringle string at a specific word/string

I am trying to generate a table with 2 columns from a single string. Example: (From string) *Col1* a:axx b:bxxxx c:cx *Col2* d:dxx e:exxxx (To output) *Col1* *Col2* a axx d dxx b bxxxx e exxxx c …
1
vote
2 answers

Trouble adding season column based on a datetime object

I'm trying to finish my workproject but I'm getting stuck at a certain point. Part of the dataframe I have is this: year_month year month 2007-01 2007 1 2009-07 2009 7 2010-03 2010 3 However, I want to add the column "season". I'm…
DataDude
  • 136
  • 7
1
vote
2 answers

How to multiply specific values of a column with a specific value in R

So I have a data frame with 2 columns. In the first column (year) I have data from multiple years. In the second column (wage_base) I have data regarding the base wage. I want to multiply all the rows of the data frame belonging to the year 2010,…
Ana
  • 65
  • 4
1
vote
1 answer

How to save different file from one file using value in specific column using bash

i want to save line using value from column $1 and save the line in one file using value from $1, if it has different value save it into another new file 112 14.7 114.98 -0.92 -0.12 112 14.8 114.02 -0.78 0.76 112 14.1 114.99 -0.98 -0.11 113 12.5…
1
vote
1 answer

How to order by multiple columns in pyspark

I have a data frame:- Price sq.ft constructed 15000 800 22/12/2019 80000 1200 25/12/2019 90000 1400 15/12/2019 70000 1000 10/11/2019 80000 1300 24/12/2019 15000 950 26/12/2019 I want to sort multiple columns at…
Toi
  • 127
  • 2
  • 9
1
vote
1 answer

How to put batch command output in desired column of csv file

i'm new in batch programmation and it's been 8 hours i'm trying to figure how to resolve my problem. That's why i'm here, i'm sure I passed out of something ... I have a command @ECHO OFF echo Demarre le %date:~0,8% a %time:~0,5% >>…
1
vote
1 answer

Create new column based on end of a string with different lengths in pandas

Dataframe description total average number 0 NFL football (white) L 49693 66 1007 1 NFL football (white) XL 79682 74 1198 2 NFL football (white) XS 84943 81 3792 3 NFL…
Ed Jefferies
  • 165
  • 9
1
vote
1 answer

How to create two columns that count the total number of two conditions

I have a diabetes dataset that has a column called Outcome and only has two values, 1 = Diabetes, 0 = Non-Diabetes. I want to count the total number of 1's and 0's based on age and then have a % of 1's based on age. I have this code below: by_age1…
1
vote
1 answer

Apply cubic root transformation and StandardScaler to some specific columns in pandas dataframe

I do have a data frame with so many cols. I would like to apply cbrt transformation first and then StandardScaler() to some specific cols in a dataframe for each month but I received some…
melik
  • 1,268
  • 3
  • 21
  • 42