calculated-columns Questions

7

Solved

I have a data frame that has 2 columns. column1 has random numbers in column2 is a place holding column for what i want column3 to look like random temp 0.502423373 1 0.687594055 0 0.741883739 0...
Otey asked 6/12, 2013 at 4:34

3

What I'm looking for is a "best-practices-approved" alternative to the following workaround / workflow. Consider that I have a bunch of columns of similar data, and would like to perform ...

10

Solved

I am creating a computed column across fields of which some are potentially null. The problem is that if any of those fields is null, the entire computed column will be null. I understand from the...
Disparage asked 26/5, 2010 at 21:5

1

I have to check if a date column is in a range. In particular I have to check if it is included in a range given by another date +/- n days. Suppose my dataframe is: import pandas as pd d = { 'dat...
Dola asked 13/2, 2019 at 8:22

2

Solved

I've a dataframe and I want to add a new column based on a value returned by a function. The parameters to this functions are four columns from the same dataframe. This one and this one are somewha...

2

When reading from database, I want to sort my Post entities based on two factors: likes count (the more the better) age (the newer the better) Currently I have implemented it this way (as a cal...
Athwart asked 18/9, 2018 at 20:35

2

Solved

Here is my situation: In my table i two fields: - Price (decimal (15,4) - TaxId (int) TaxId value is not stored anywhere but there are only two values (actualy 3). - 1 (8.5%) - 2 (20%) - NULL ...
Brinn asked 6/6, 2012 at 10:7

3

Solved

I'm trying add a new column to a data frame based on several conditions from other columns. I have the following data: > commute <- c("walk", "bike", "subway", "drive", "ferry", "walk", "bik...

3

I've a simple table with some amount and interval in sec by date and product name. Month | Product | Amount | Interval in sec ------------------------------------------ 05-'12| Prod A | 10 | 5 05-...
Sunbonnet asked 13/9, 2012 at 8:21

2

Solved

How to check if computed column is persisted? (MS SQL Server)
Inspiration asked 11/3, 2011 at 12:17

5

I am having trouble using a calculated column in postgres. A similar code which works in SQL is given below, is it possible to recreate this in PostgreSQL? select cost_1, quantity_1, cost_2, quant...
Sporting asked 12/1, 2012 at 18:23

1

Solved

I have a df akin to df1 where I want to break out the rows so that the HOURS column is in intervals of 4, shown in df2. How would I approach this problem and what packages are recommended? IDs can...
Earthy asked 4/6, 2018 at 23:48

2

Solved

I'm looking to add a new column to a pre-existing table which is filled with values. The new column is going to be NOT NULL, and so for each pre-existing row it will need a value. I'm looking for ...
Exieexigency asked 19/3, 2018 at 16:58

2

Solved

I have a database called temp, with daily stock prices: Ticker Date price ABC 01/01/13 100.00 ABC 01/02/13 101.50 ABC 01/03/13 99.80 ABC 01/04/13 95.50 ABC 01/05/13 78.00 XYZ 01/01/13 11.50 ...
Bribery asked 17/2, 2018 at 5:30

3

This is My table : ID Q1 Q2 Q3 Q4 ---------------------------------------------------------------- 20130712 NULL 728.63 NULL NULL 20130712 8881.55 9673.68 2629.566 6251.984 20130713 1813 1813 84.4...
Sandasandakan asked 15/8, 2013 at 4:4

3

Solved

If I include a computed column in a table, does it place a perfomance burden on it? For example, if I have a table defined as follows: CREATE TABLE users( givenname …, familyname …, fullname A...
Disesteem asked 29/9, 2017 at 6:25

5

Solved

I have a persisted computed column in a large table in in SQL Server 2005. I want to convert it to a regular column, keeping current values. Do I have to recreate the column and update the entire...
Machellemachete asked 10/11, 2010 at 11:15

4

Solved

I have a (rather complicated) SQL statement where I select data from lots of different tables, and to cope with a bad legacy data structure, I have a couple of custom columns that get their values ...
Protecting asked 16/7, 2010 at 12:47

2

Solved

I am developing a rental marketplace application with Rails 5. It has a quite simple structure with users, products and orders, with the products belonging to users, who actually create them. In o...

3

Solved

The following code/outcome baffles me as to why data.table returns NA for the mean functions and not the sd function. library(data.table) test <- data.frame('id'=c(1,2,3,4,5), 'A'=seq(2,9,leng...
Fiendish asked 27/8, 2014 at 19:34

2

Solved

I have a problem about the difference calculation for the rows using calculated column in Spotfire. I am wondering if it is possible to create a calculated column that will count the difference be...
Loan asked 23/9, 2016 at 13:35

2

Solved

Regarding the previous question which I have posted: calculation the difference for same column for the specific rows in Spotfire I have a new problem for it, below is the sample: The new funct...
Andromada asked 27/9, 2016 at 12:59

2

Can I create a generated column in table A which sums up a column in table B with a tableA_id of the row in table A? Suppose I have a table of of families, and a table of children. I want a sum of...

2

Solved

I am getting odd results when using NEWID() in combination with a persistent computed column. Am I using some function wrong? Not using persisted when creating the column, and therefore calculatin...
Exurb asked 30/6, 2016 at 10:38

2

Solved

I have a dataframe, trip: > head(trip.mutations) Ref.y Variant.y 1 T C 2 G C 3 A C 4 T C 5 C A 6 G A I want to add a third column, mutType, that follows these rules: for (i in 1:nrow(...
Ahmedahmedabad asked 26/4, 2014 at 20:29

© 2022 - 2025 — McMap. All rights reserved.