Tutorial by Examples: am

In [1]: import pandas as pd In [2]: df = pd.DataFrame(columns = ['A', 'B', 'C']) In [3]: df Out[3]: Empty DataFrame Columns: [A, B, C] Index: [] Appending a row by a single column value: In [4]: df.loc[0, 'A'] = 1 In [5]: df Out[5]: A B C 0 1 NaN NaN Appending a ...
Create an Entity in AppBundle/Entity directory. You can do this manually, or by using Symfony's command php bin/console doctrine:generate:entity and filling in the required information in each step. You must specify yml option at Configuration format (yml, xml, php or annotation) step. <?php...
In this example we use a parameter in the route to specify the page number. We set a default of 1 in the function parameter page=1. We have a User object in the database and we query it, ordering in descending order, showing latest users first. We then use the paginate method of the query object in ...
A normal let form binds each value to its corresponding identifier, before executing the body. With a "named let", the body can then recursively be re-executed, passing a new value for each identifier. #lang racket (let sum-of-list ([l '(1 2 3)]) (if (null? l) 0 (+ (car ...
To update multiple documents in a collection, set the multi option to true. db.collection.update( query, update, { upsert: boolean, multi: boolean, writeConcern: document } ) multi is optional. If set to true, updates multiple documents that meet the query crit...
You have to add a div with the class .row-height inside the row, and also add .col-height to the columns. If you want to restrict the effect to a certain media query, just use the responsive .row-height and .col-height classes: for example .row-sm-height with .col-sm-height. CSS version: .row-heig...
I find that the examples in the docker inspect documentation seem magic, but do not explain much. Docker inspect is important because it is the clean way to extract information from a running container docker inspect -f ... container_id (or all running container) docker inspect -f ... $(docker p...
import pygame background_colour = (255,255,255) # For the background color of your window (width, height) = (300, 200) # Dimension of the window screen = pygame.display.set_mode((width, height)) # Making of the screen pygame.display.set_caption('Tutorial 1') # Name for the window screen.fil...
Through this example, it will be explained to divide the node.js code into different modules/folders for better undertandibility. Following this technique makes it easier for other developers to understand the code as he can directly refer to concerned file instead of going through whole code. The m...
The following example is a very useful basis when you are trying to convert transaction data to un-pivoted data for BI/reporting reasons, where the dimensions which are to be un-pivoted can have a dynamic set of columns. For our example, we suppose that the raw data table contains employee assessme...
OpenCL is low level api so it must be implemented in "C space" first. For that, one needs to download header files from Khronos' site. My hardware is AMD and capable of version 1.2, downloading opencl.h cl_platform.h cl.h cl_ext.h cl_egl.h cl_dx9_media_sharing.h cl_d3d10.h c...
### Elixir ### /_build /cover /deps erl_crash.dump *.ez ### Erlang ### .eunit deps *.beam *.plt ebin rel/example_project .concrete/DEV_MODE .rebar
XML <Dashavatar> <Avatar name="Matsya"/> <Avatar name="Kurma"/> <Avatar name="Varaha"/> <Avatar name="Narasimha"/> <Avatar name="Vamana"/> <Avatar name="Balabhadra"/> ...
XML <Dashavatar> <Avatar name="Matsya"/> <Avatar name="Kurma"/> <Avatar name="Varaha"/> <Avatar name="Narasimha"/> <Avatar name="Vamana"/> <Avatar name="Balabhadra"/> ...
XML <Dashavatar> <Avatar name="Matsya"/> <Avatar name="Kurma"/> <Avatar name="Varaha"/> <Avatar name="Narasimha"/> <Avatar name="Vamana"/> <Avatar name="Balabhadra"/> ...
XML <House> <numRooms>4</numRooms> <Room name="living"/> <Room name="master bedroom"/> <Room name="kids' bedroom"/> <Room name="kitchen"/> </House> XPATH /House/child::Room or /...
Suppose we want to have the following behaviour - We have a heading (say h3 element) and on clicking it, we want it to become an input box so that we can modify heading name. React makes this highly simple and intuitive using component states and if else statements. (Code explanation below) // I ha...
User defined table functions represented by org.apache.hadoop.hive.ql.udf.generic.GenericUDTF interface. This function allows to output multiple rows and multiple columns for a single input. We have to overwrite below methods : 1.we specify input and output parameters abstract StructObjectInspe...
[TestCase(0, 0, 0)] [TestCase(34, 25, 59)] [TestCase(-1250, 10000, 8750)] public void AddNumbersTest(int a, int b, int expected) { // Act int result = a + b; // Assert Assert.That(result, Is.EqualTo(expected)); }

Page 77 of 129