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
1 answer

Using a loop to populate rows of a new column in python based on content found in other column rows

I am looking for help with populating the contents of a new column in my dataframe. I need the New_column to populate based on content in other columns. import pandas as pd df = pd.read_csv('sample.txt') # the data is imported as one…
kn2298
  • 49
  • 5
1
vote
1 answer

How can I group by two columns interchangeably?

How can I group by two columns interchangeably? For example, if I have this table and I want to get However, I get this instead when I use df.insert(2, 'Count', df.groupby(['Name1','Name2'])['Name1'].transform('size')) The entries (rows) that…
1
vote
2 answers

Splitting a dataframe string column into multiple columns without a pattern

I have a data.frame with a column named "Extra" containing many information separated by ";". I only want to keep the part after including first word "MES". > [1]…
1
vote
1 answer

Calculate several weighted average columns at once in R

Let's assume the following data frame (though my real dataset has much more columns): df<- data.frame(date=c(01.01.2010,02.01.2010, 03.01.2010), x1=c(1,2,4), y1=c(1,2,3), x2=c(1,2,2), y2=c(3,4,4), x3=c(3,3,3), y3=c(3,4,5)) Date x1 y1 x2…
ZayzayR
  • 183
  • 9
1
vote
3 answers

How to split multiple-column boxplot by values?

Tried to search but didn't find what I need. I'll use to code to demonstrate what I…
Tony Xu
  • 3,031
  • 4
  • 32
  • 43
1
vote
2 answers

calculate totals in each column and then run a fishers test in R

Data: variant disease control total A1 1 53 54 A2 6 2 8 A3 15 37 52 A4 0 53 53 A5 65 4 69 A6 4 5 9 A7 3 34 37 I would like to add a row…
tacrolimus
  • 500
  • 2
  • 12
1
vote
1 answer

I want to isolate multiple columns in a dataframe from a vector source and convert their data type from character to numeric using R

I have a dataframe col1|col2|col3|cola|colb|colc|cold "1" "1" "1" x x x x Then I have a vector colnum<-c("col1","col2","col3") I use this script to convert the specific columns in the dataframe from the vector as a source from…
user35131
  • 1,105
  • 6
  • 18
1
vote
3 answers

Stuck on beginner SQL practice. Multiple table where columns use same id

I'm very sorry to bother with minor problem, but I tried to search old answers for this one and since my skills in SQL are complete 0, I didn't even understand the answers :/! Neither is my English terminology great enough for properly searching. I…
HuManatee
  • 67
  • 5
1
vote
2 answers

Extracting columns by names (matching patterns) in bash

Coding,Value,Meaning,54-1.0,54-2.0,431-2.0,212-0.0,212-1.0 1,1,Yes,0.4,0.3,0.7,0.1,0.6 2,0,Other job (free text entry),0,0.7,0.3,0.7,0.8 2,1,Managers and Senior Officials,0.5,0.2,0.4,0.7,0.7 2,11,Corporate…
cyrusjan
  • 637
  • 1
  • 8
  • 23
1
vote
1 answer

Multicolumn listbox in aspx page

I have a list box: I want to make it multicolumn. I googled a lot but not finding the appropriate answer. I am working in ASP.NET C#.
asma
  • 2,795
  • 13
  • 60
  • 87
1
vote
1 answer

How to split pandas column into two columns with strings and ints

Im looking to split the column Date range into two columns, starting date and ending date. However it split doesn't seem to work because it does not recognise the '-'. Any advice? I tried using ''' ebola1 = pd.DataFrame(ebola['Date…
AnnejetLouise
  • 45
  • 1
  • 7
1
vote
2 answers

How to use apply for multiple Pandas dataset columns?

I am hardly trying to fill some columns with NaN values, selected from a previous list. The code is going to the else path and never makes the correct modifications... df1 = pd.DataFrame({'A': ['A0', 'A1', 'A2', 'A3'], 'B': [0.0,…
1
vote
1 answer

How do I drop every column that only contains values from a list pandas

I want to be able to drop all columns that only have values from the list that I pass in. list_of_drops = ['A','B'] d ={'C1':['A','A','A','B','B','B'], 'C2':['A','C','A','A','A','A'], 'C3':['A','B','B','A','B','B'], …
Jonathan Hay
  • 195
  • 11
1
vote
1 answer

Is it possible to create html div Columns without CSS?

Just wondering is it possible to use HTML alone to create a div columns without the use of any CSS? It would make things easy for me with less code etc. Thanks for any suggestions or examples.
Yummi
  • 117
  • 1
  • 1
  • 8
1
vote
1 answer

SQL query not returning expected values when summing total values in a column

I have this schema: Students (sid: int, firstName: str, lastName: str, yearStarted: int) Majors (sid: int, major: str) Note: a student may have more than one major. Grades (sid: int, cid: int, credits: int, grade: int) Note: sid, cid=foreign…
overduekey
  • 51
  • 1
  • 7