columnname

Find all stored procedures that reference a specific column in some table

浪子不回头ぞ 提交于 2019-12-02 16:35:11
I have a value in a table that was changed unexpectedly. The column in question is CreatedDate : this is set when my item is created, but it's being changed by a stored procedure. Could I write some type of SELECT statement to get all the procedure names that reference this column from my table? huMpty duMpty One option is to create a script file. Right click on the database -> Tasks -> Generate Scripts Then you can select all the stored procedures and generate the script with all the sps. So you can find the reference from there. Or -- Search in All Objects SELECT OBJECT_NAME(OBJECT_ID),

How to do Multi-Column from_tuples?

元气小坏坏 提交于 2019-11-30 19:04:25
I get how to use pd.MultiIndex.from_tuples() in order to change something like Value (A,a) 1 (B,a) 2 (B,b) 3 into Value Caps Lower A a 1 B a 2 B b 3 But how do I change column tuples in the form (A, a) (A, b) (B,a) (B,b) index 1 1 2 2 3 2 2 3 3 2 3 3 4 4 1 into the form Caps A B Lower a b a b index 1 1 2 2 3 2 2 3 3 2 3 3 4 4 1 Many thanks. Edit: The reason I have a tuple column header is that when I joined a DataFrame with a single level column onto a DataFrame with a Multi-Level column it turned the Multi-Column into a tuple of strings format and left the single level as single string. Edit

specify dplyr column names [duplicate]

陌路散爱 提交于 2019-11-30 11:07:17
This question already has an answer here: Group by multiple columns in dplyr, using string vector input 9 answers How can I pass column names to dplyr if I do not know the column name, but want to specify it through a variable? e.g. this works: require(dplyr) df <- as.data.frame(matrix(seq(1:9),ncol=3,nrow=3)) df$group <- c("A","B","A") gdf <- df %.% group_by(group) %.% summarise(m1 =mean(V1),m2 =mean(V2),m3 =mean(V3)) But this does not require(dplyr) someColumn = "group" df <- as.data.frame(matrix(seq(1:9),ncol=3,nrow=3)) df$group <- c("A","B","A") gdf <- df %.% group_by(someColumn) %.%

Create a subset of a DataFrame depending on column name

不想你离开。 提交于 2019-11-30 04:30:15
问题 I have a pandas DataFrame called timedata with different column names, some of which contain the word Vibration, some eccentricity. Is is possible to create a dataframe of just the columns containing the word Vibration? I have tried using vib=[] for i in timedata: if 'Vibration' in i: vib=vib.append(i) to then create a DataFrame based on the indicies of these columns. This really does not seem like the most efficient way to do it and I'm sure there must be something simple to do with list

pandas assign with new column name as string

青春壹個敷衍的年華 提交于 2019-11-30 04:18:47
I recently discovered pandas "assign" method which I find very elegant. My issue is that the name of the new column is assigned as keyword, so it cannot have spaces or dashes in it. df = DataFrame({'A': range(1, 11), 'B': np.random.randn(10)}) df.assign(ln_A = lambda x: np.log(x.A)) A B ln_A 0 1 0.426905 0.000000 1 2 -0.780949 0.693147 2 3 -0.418711 1.098612 3 4 -0.269708 1.386294 4 5 -0.274002 1.609438 5 6 -0.500792 1.791759 6 7 1.649697 1.945910 7 8 -1.495604 2.079442 8 9 0.549296 2.197225 9 10 -0.758542 2.302585 but what if I want to name the new column "ln(A)" for example? E.g. df.assign

How to do Multi-Column from_tuples?

久未见 提交于 2019-11-30 03:13:57
问题 I get how to use pd.MultiIndex.from_tuples() in order to change something like Value (A,a) 1 (B,a) 2 (B,b) 3 into Value Caps Lower A a 1 B a 2 B b 3 But how do I change column tuples in the form (A, a) (A, b) (B,a) (B,b) index 1 1 2 2 3 2 2 3 3 2 3 3 4 4 1 into the form Caps A B Lower a b a b index 1 1 2 2 3 2 2 3 3 2 3 3 4 4 1 Many thanks. Edit: The reason I have a tuple column header is that when I joined a DataFrame with a single level column onto a DataFrame with a Multi-Level column it

Row names & column names in R

不羁的心 提交于 2019-11-29 23:11:34
Do the following function pairs generate exactly the same results? Pair 1) names() & colnames() Pair 2) rownames() & row.names() Dirk Eddelbuettel As Oscar Wilde said Consistency is the last refuge of the unimaginative. R is more of an evolved rather than designed language, so these things happen. names() and colnames() work on a data.frame but names() does not work on a matrix: R> DF <- data.frame(foo=1:3, bar=LETTERS[1:3]) R> names(DF) [1] "foo" "bar" R> colnames(DF) [1] "foo" "bar" R> M <- matrix(1:9, ncol=3, dimnames=list(1:3, c("alpha","beta","gamma"))) R> names(M) NULL R> colnames(M) [1]

specify dplyr column names [duplicate]

末鹿安然 提交于 2019-11-29 16:36:16
问题 This question already has an answer here: Group by multiple columns in dplyr, using string vector input 9 answers How can I pass column names to dplyr if I do not know the column name, but want to specify it through a variable? e.g. this works: require(dplyr) df <- as.data.frame(matrix(seq(1:9),ncol=3,nrow=3)) df$group <- c("A","B","A") gdf <- df %.% group_by(group) %.% summarise(m1 =mean(V1),m2 =mean(V2),m3 =mean(V3)) But this does not require(dplyr) someColumn = "group" df <- as.data.frame

DataGridView Edit Column Names

一世执手 提交于 2019-11-29 03:57:45
Is there any way to edit column names in a DataGridView? I don't think there is a way to do it without writing custom code. I'd implement a ColumnHeaderDoubleClick event handler, and create a TextBox control right on top of the column header. Ryan Spears You can also change the column name by using: myDataGrid.Columns[0].HeaderText = "My Header" but the myDataGrid will need to have been bound to a DataSource . Bjørn Otto Vasbotten You can edit the header directly: dataGridView1.Columns[0].HeaderCell.Value = "Created"; dataGridView1.Columns[1].HeaderCell.Value = "Name"; And so on for as many

Row names & column names in R

a 夏天 提交于 2019-11-28 19:36:32
问题 Do the following function pairs generate exactly the same results? Pair 1) names() & colnames() Pair 2) rownames() & row.names() 回答1: As Oscar Wilde said Consistency is the last refuge of the unimaginative. R is more of an evolved rather than designed language, so these things happen. names() and colnames() work on a data.frame but names() does not work on a matrix: R> DF <- data.frame(foo=1:3, bar=LETTERS[1:3]) R> names(DF) [1] "foo" "bar" R> colnames(DF) [1] "foo" "bar" R> M <- matrix(1:9,