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

Display Inline-Block problem, trying to create a double column page

I try some tips on other Stackoverflow queries but it does not apply here. This is what I want. * { box-sizing: border-box; } html { height:100%; width:100%; border: 0px; margin:0; padding:0; } body { height:…
1
vote
1 answer

Python: how to get consistent number of columns?

I am creating my own chemical files to train a neural network. I want to have the following format : C -0.56253228 0.3335121 0.31736381 # atom and its 3 cartesian coordinates x, y, z. I want that whenever I select x,y,z, it will correspond to…
1
vote
2 answers

Add Months column to a Date column in Pandas

I want to add a column with a number of months to a column with dates. So far I have tried (pd.DateOffset(months=plus_month_period)) however ‘months’ wont accept a column, just a number. My most successful attempt has been the following: dates =…
CDPF
  • 55
  • 6
1
vote
1 answer

How to store the values that match the condition in a separate column in the dataframe in R?

I have the dataset that looks like this: ISIN Variable Value 182 Sales2008 276 182 Sales2009 800 182 Sales2010 900 182 Sales2011 273 182 Sales2012 276 182 …
Jana L
  • 15
  • 4
1
vote
2 answers

Check for multiple NA columns and return another column in R

I have a dataframe that has multiple columns named as "avg_metric", "wkday_avg_metric", "event_avg_metric" and "monthly_avg_metric", in which "metric" consists of multiple metrics with these calculations (orders, revenue, etc). I have to check for…
1
vote
1 answer

Changing column names of many dataframes in a loop

I have three dataframes EC_Data, ED_Data, and ST_data all of them have the same column names and more specifically, after 4th column has Year named colums from 2006 to 2015 So I create a new list that has all three dataframes: Alldata =…
1
vote
2 answers

Can I create a flag column with a sequence of values by columns?

It is hard to explain, but I have a data.frame (2.915 rows) with ID column and years columns: In this data.frame I want to verify if any ID has the sequence 1,0 (one or more years with zero),1* in the columns. Like this: I mean, a flag column…
RxT
  • 486
  • 7
  • 17
1
vote
1 answer

list of dataframes to a list of plots; for loops, lapply

I have a list of dataframes in Rlist as such: Rlist = lapply(1:5,function(i){ data.frame(Frame_times = seq(0,1,length.out=100),L1=runif(100), L2 = runif(100), L3 = runif(100)) }) names(Rlist) = letters[1:5] As you can see, there is a list…
Drew
  • 563
  • 2
  • 8
1
vote
1 answer

Replace values with conditions over specific columns

I've tried to automate this and searched around but it's not fruitful. I downloaded the following data from Yahoo Finance. require(quantmod) tickers <- c("SPY") start <- "2020-01-01" end <- "2020-06-01" getSymbols(tickers, from =…
Khan
  • 147
  • 1
  • 7
1
vote
2 answers

Remove rows from dataframe df1 if their columnS valueS exist in other dataframe df2

I tried this : res = df1[~(getattr(df1, 'A').isin(getattr(df2, 'A')) & getattr(df1, 'C').isin(getattr(df2, 'C')))] It works BUT the list of columns is variable in this example columns = ['A', 'C'] how can I loop over it to get the above expression…
asmatrk
  • 237
  • 2
  • 9
1
vote
1 answer

CSS avoid column "spread" in container

I use a very simple column layout using column-width equal to the width of the images that are inside. The problem is that, even with column-gap: 0, there still is a gap between the columns when the parent container isn't an exact multiple of the…
Gaetan L.
  • 649
  • 6
  • 20
1
vote
1 answer

awk compare two columns in two files and append adjusted non matched into output

hello i am trying to compare file1 with file2, it compares from file1 column $1,$2 and from file2 $1,$3 if there is match it will output those from file1 and file2 to output file where during comparison is copied column $1,$2,$7,$9 from file1 and…
da4fdsa6
  • 85
  • 7
1
vote
0 answers

For all values that are the same in column A, find matches between 2 other columns

I am (obviously) new to r, I want to evaluate a dataframe so that for every value that is the same in "id", I determine if there is a match for that same id for coder1 and coder2. Everything I've tried takes the first value encountered for each…
jskibro
  • 15
  • 5
1
vote
2 answers

R function (Loop?) to make a new graph for each column in a dataset

I'm trying to write the code to use my dataset and make a new graph for each column of a dataset, rather than have to write out a new value for y each time in the code. I have a dataset where each row is a person, each column is a measurement in the…
Erin Giles
  • 73
  • 6
1
vote
1 answer

How to group multiple columns together and plot a bar graph?

I have a data frame that I have split using the splitstackshape package. After splitting I unable to proceed with grouping multiple columns and plotting a bar chart. The code is as follows, library(tidyverse) library(splitstackshape) df <-…
Silent_bliss
  • 307
  • 1
  • 6