Tutorial by Examples: column

import pandas as pd df = pd.DataFrame([{'var1': 'a,b,c', 'var2': 1, 'var3': 'XX'}, {'var1': 'd,e,f,x,y', 'var2': 2, 'var3': 'ZZ'}]) print(df) reshaped = \ (df.set_index(df.columns.drop('var1',1).tolist()) .var1.str.split(',', expand=True) .stack() .reset_ind...
CREATE TABLE times ( dt DATETIME(3), ts TIMESTAMP(3) ); makes a table with millisecond-precision date / time fields. INSERT INTO times VALUES (NOW(3), NOW(3)); inserts a row containing NOW() values with millisecond precision into the table. INSERT INTO times VALUES ('2015-01...
If you have a Javascript timestamp value, for example 1478960868932, you can convert that to a MySQL fractional time value like this: FROM_UNIXTIME(1478960868932 * 0.001) It's simple to use that kind of expression to store your Javascript timestamp into a MySQL table. Do this: INSERT INTO table...
Most of the time we like to get the total number of occurrence of a column value in a table for example: TABLE NAME : REPORTS ReportNameReportPriceTest10.00 $Test10.00 $Test10.00 $Test 211.00 $Test10.00 $Test 314.00 $Test 314.00 $Test 4100.00 $ SELECT ReportName AS REPORT ...
SELECT 1 NUM_COLUMN, 'foo' VARCHAR2_COLUMN from DUAL UNION ALL SELECT NULL, NULL from DUAL; NUM_COLUMNVARCHAR2_COLUMN1foo(null)(null)
//Make all text fit the cells worksheet.Cells[worksheet.Dimension.Address].AutoFitColumns(); //Autofit with minimum size for the column. double minimumSize = 10; worksheet.Cells[worksheet.Dimension.Address].AutoFitColumns(minimumSize); //Autofit with minimum and maximum size for the c...
'<div style="font-size:11pt">' || expression || '</div>'
Below example shows how to change the hyperlink for "ID" and "Title(LinkTitle)" field inside the list view using CSR. Step1 : Create a JS file and paste below code (function () { function registerRenderer() { var ctxForm = {}; ctxForm.Templates = {}...
This example shows how to hide a "Date" field from the SharePoint list view using CSR. (function () { function RemoveFields(ctx) { var fieldName = "Date"; // here Date is field or column name to be hide var header = document.querySelectorAll("[d...
COPY products(is_public, title, discount) TO 'D:\csv_backup\products_db.csv' DELIMITER ',' CSV HEADER; COPY categories(name) TO 'D:\csv_backup\categories_db.csv' DELIMITER ',' CSV HEADER;
There are cases when you need to change Display Name of column in a list view e.g. Column Name showing in the view is "IsApprovalNeeded" and you want to appear as "Is Approval Needed?". You can, of course change the display name of a column by changing the column title in list ...
Sometimes one would like to pass names of columns from a data frame to a function. They may be provided as strings and used in a function using [[. Let's take a look at the following example, which prints to R console basic stats of selected variables: basic.stats <- function(dset, vars){ f...
SET @searchTerm= 'Date Database Programming'; SELECT MATCH (Title, Author) AGAINST (@searchTerm IN NATURAL LANGUAGE MODE) Score, ISBN, Author, Title FROM book WHERE MATCH (Title, Author) AGAINST (@searchTerm IN NATURAL LANGUAGE MODE) ORDER BY MATCH (Title, Author) AGAINST (...
//Hide column "A" worksheet.Column(1).Hidden = true; //Hide row 1 worksheet.Row(1).Hidden = true;
//Set the row "A" height to 15 double rowHeight = 15; worksheet.Row(1).Height = rowHeight; //Set the column 1 width to 50 double columnWidth = 50; worksheet.Column(1).Width = columnWidth; When Bestfit is set to true, the column will grow wider when a user inputs numbers in a ce...
workSheet.Cells[1,5,100,5].Copy(workSheet.Cells[1,2,100,2]); Copies column 5 into column 2 Basically Source.Copy(Destination) This would only copy the first 100 rows. Cells[RowStart, ColumnStart, RowEnd, ColumnEnd ] is the format so to copy a row into another row you would just switch the ind...
If you have the following data file cat data.csv 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 maybe you need to read the fourth column of the third line, this would be "24" awk 'NR==3 ...
SELECT DISTINCT object_name(i.object_id) AS [Object Name], c.name AS [Partition Column], s.name AS [Partition Scheme], pf.name AS [Partition Function], prv.tot AS [Partition Count], prv.miVal AS [Min Boundry Value], prv.maVal AS [Max Boundry Value] FROM sys.object...
<div class="row"> <div class="col-sm-9"> Level 1: .col-sm-9 <div class="row"> <div class="col-xs-8 col-sm-6"> Level 2: .col-xs-8 .col-sm-6 </div> <div class="col-xs-4 col-sm-6&quo...
The first code block is written in Bootstrap 3. In Bootstrap 3 there are 4 types of column specifications, namely col-md-* col-lg-* col-sm-* col-xs-* . A fully responsive layout will look like this in Bootstrap 3: <div class="row"> <div class="col-lg-4 col-md-8 col-sm-8...

Page 8 of 9