Electron microscopy
 
YAML Reading
- Python for Integrated Circuits -
- An Online Book -
Python for Integrated Circuits                                                                                   http://www.globalsino.com/ICs/        


Chapter/Index: Introduction | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | Appendix

=================================================================================

YAML is most often used for configuration files as well as is used for data exchange. Similar to JSON and XML, YAML is a human-friendly data serialization language for all programming languages:
          i) You can store multiple documents in one YAML file with the --- separator.
          ii) It’s easy to parse for computers.
          iii) As many large projects, like Docker and Kubernetes, you can use YAML to define deployments.
          iv) It has a richer syntax than the often used alternative.
          v) it’s also easy to parse YAML, especially with Python and the PyYAML library.

However, there are some drawbacks of using YAML with Python, for instance, YAML is not part of the standard Python library, while XML and JSON are. Both JSON and YAML are developed to provide a human-readable data interchange format. Table 2369 lists the comparison between YAML vs JSON.

Table 2369. Comparison between YAML vs JSON.

  YAML JSON
Complexity Complex and time consuming process of parsing Serialized data Quickly and easily parse JSON serialized data with its simpler design
Support Less community support Larger community support and popularity
Comment Supports comments Doesn’t support comments
Reference Ability to use reference of other data objects Impossible to serialize complex structures with object references
Structure Hierarchy is denoted by using double space characters. Tab characters are not allowed Objects and Arrays are denoted in braces and brackets.
String quotes String quotes are optional but it supports single and double quotes. Strings must be in double quotes.
Root node Root node can be any of the valid data types Root node must either be an array or an object.

============================================

Read YAML files: code:
          Print even numbers
Output:          
          Print even numbers

============================================

Read YAML files: code:
          Print even numbers
Output:          
          Print even numbers

============================================

Read YAML files: code:
          Print even numbers
Output:          
          Print even numbers

============================================

Last n days (.to_datetime(x), .set_index(y), .last(z) in pandas) with .yaml file as input. Code A:
         Upload Files to Webpages
         YAML file input A:    
         Upload Files to Webpages
       CSV input:    
         Upload Files to Webpages
       Output A:    
         Upload Files to Webpages
     Code B:
         Upload Files to Webpages
         YAML file input B:    
         Upload Files to Webpages
       CSV input:    
         Upload Files to Webpages
       Output B:    
         Upload Files to Webpages

============================================

 

         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         

 

 

 

 

 



















































 

 

 

 

 

=================================================================================