Skip to main content

Featured post

8 Top Data Science Platform Developers in the World

Top data science tools and platforms providers across the world. Useful information for data science and data analytics developers.

Data Science is a combination of multiple skills. AI and Machine Learning are part of data science. You can create AI and Machine Learning products with data. 

Related Posts

Top Skills You Need for Data Science CareerData Science Sample Project an Example

Python user defined functions real examples you need

In Python, user-defined functions real use is you can use in scripts You can avoid repeated work. These are very different from C/C++/JAVA. I will give you syntax and example for your quick reference and how to start learning quickly.
udf in python

Python Syntax for User defined function(UDF)

def function_name(list of parameters): 
"docstring" 
statement(s) 
return(parameter)       

  Explanation of each keyword 

  1. The keyword def symbolizes the start of the function header.
  2. A function name to uniquely identify it. Function naming follows the similar rules that are used for writing identifiers
  3. List of parameters also called as a list of arguments through which value is passed to the function. The list of parameters is optional.
  4. A colon (:) to mark the end of function header.
  5. Optional documentation string (docstring) is used to describe the purpose of the function, which is slightly similar to python documentation using comment.
  6. Python statements that perform the intended task for which the user-defined function is made. It is mandatory to maintain the indentation level while writing python statements in the function definition.
  7. In the end, an optional return statement is used to return a value (result) from the function. This statement can contain an optional parameter to return the computed result back to the function call. If there is no parameter in the statement or the return statement is not mentioned at the end of function definition then the function returns the None object.
The above example is a good one. You can start learning Python UDF quickly.

Python Vs Other Languages
Python in analytics
Python is one of the most popular languages in data analytics. There are many other languages that have an option to create UDFs. Even in SQL of any database, you can easily create user-defined functions.

Advantages of Python UDF

  • User-defined functions help to decompose a large program into small segments which make the program easy to understand, maintain and debug.
  • If repeated code occurs in a program. The function can be used to include those codes and execute when needed by calling that function.
  • Programmers working on the large project can divide the workload by making different functions.
References

One practical advice

It is always a good idea to name user-defined functions according to the task they perform.

Also Read

Comments

Popular posts from this blog

Hyperledger Fabric Real Interview Questions Read Today

I am practicing Hyperledger. This is one of the top listed blockchains. This architecture follows R3 Corda specifications. Sharing the interview questions with you that I have prepared for my interview.

Though Ethereum leads in the real-time applications. The latest Hyperledger version is now ready for production applications. It has now become stable for production applications.
The Hyperledger now backed by IBM. But, it is still an open source. These interview questions help you to read quickly. The below set of interview questions help you like a tutorial on Hyperledger fabric. Hyperledger Fabric Interview Questions1). What are Nodes?
In Hyperledger the communication entities are called Nodes.

2). What are the three different types of Nodes?
- Client Node
- Peer Node
- Order Node
The Client node initiates transactions. The peer node commits the transaction. The order node guarantees the delivery.

3). What is Channel?
A channel in Hyperledger is the subnet of the main blockchain. You c…

Blue Prism complete tutorials download now

Blue prism is an automation tool useful to execute repetitive tasks without human effort. To learn this tool you need the right material. Provided below quick reference materials to understand detailed elements, architecture and creating new bots. Useful if you are a new learner and trying to enter into automation career.
The number one and most popular tool in automation is a Blue prism. In this post, I have given references for popular materials and resources so that you can use for your interviews.
RPA Blue Prism RPA blue prism tutorial popular resources I have given in this post. You can download quickly. Learning Blue Prism is a really good option if you are a learner of Robotic process automation.

RPA Advantages The RPA is also called "Robotic Process Automation"- Real advantages are you can automate any business process and you can complete the customer requests in less time.

The Books Available on Blue Prism 
Blue Prism resourcesDavid chappal PDF bookBlue Prism Blogs

PL/SQL: Popular Reserved Words

Perfect in PL/SQL is an art. To become this you need to understand top reserved words and their meanings. The below list is useful for your projects.


Top List of PL/SQL Reserved Words.. Before you start knowing reserved words, wait one moment. The reserved words all are similar to words that you use in normal SQL. ALL*DESC*ISOLATIONOUTSQLERRMALTER*DISTINCT*JAVAPACKAGESTART*AND*DOLEVEL*PARTITIONSTDDEVANY*DROP*LIKE*PCTFREE*SUBTYPEARRAYELSE*LIMITEDPLS_INTEGERSUCCESSFUL*AS*ELSIFLOCK*POSITIVESUMASC*ENDLONG*POSITIVENSYNONYM*AUTHIDEXCEPTIONLOOPPRAGMASYSDATE*AVGEXCLUSIVE*MAXPRIOR*TABLE*BEGINEXECUTEMINPRIVATETHEN*BETWEEN*EXISTS*MINUS*PROCEDURETIMEBINARY_INTEGEREXITMINUTEPUBLIC*TIMESTAMPINTEGEREXTENDSMLSLABEL*RAISE

Automation developer these are top Skills you need to learn

Robotic process automation is an upcoming IT skill. Three tools are popular. It is difficult to learn all three tool. So, learn anyone tool to start your career in automation.
To get a job in this line, I found in my research that some programming skills and Hand-on training on any one of the tools is required. Also, try to know the differences between popular RPA tools.
Skills Companies Looking in Automation Engineers All big companies looking for candidates having experience in Automation anywhere, Blue Prism and UIPath. It is not possible to learn all tools. Learn anyone tool and do practice well.

Ok.

You may ask a question about how to do it. Join in good training institute and learn one tool.  Take online classes to learn faster.

To learn Uipath try here. Also, you can enroll online course to learn UiPath.

UiPath GO The list of IT skills you needAutomation anywhere/Blue Prism/Uipath .Net/C#/Java/SQL skills MS-Visio Power Builder Python scripts/Unix Scripts/Perl Scripts HTML/CSS/J…

8 Top Data Science Platform Developers in the World

Top data science tools and platforms providers across the world. Useful information for data science and data analytics developers.

Data Science is a combination of multiple skills. AI and Machine Learning are part of data science. You can create AI and Machine Learning products with data. 

Related Posts

Top Skills You Need for Data Science CareerData Science Sample Project an Example

Three popular RPA tools functional differences

Robotic process automation is growing area and many IT developers across the board started up-skill in this popular area. I have written this post for the benefit of Software developers who are interested in RPA also called Robotic Process Automation.


In my previous post, I have described that total 12 tools are available in the market. Out of those 3 tools are most popular. Those are Automation anywhere, BluePrism and Uipath. Many programmers asked what are the differences between these tools. I have given differences of all these three RPA tools.

BluePrism Blue Prism has taken a simple concept, replicating user activity on the desktop, and made it enterprise strength. The technology is scalable, secure, resilient, and flexible and is supported by a comprehensive methodology, operational framework and provided as packaged software.The technology is developed and deployed within a “corridor of IT governance” and has sophisticated error handling and process modelling capabilities to ens…

Top 100 Hadoop Complex Interview Questions (Part 3 of 4)

These are complex Hadoop interview questions. This is my 3rd set of questions useful for your interviews. 1). What are the features of Standalone (local) mode? Ans). In stand-alone mode there are no daemons, everything runs on a single JVM. It has no DFS and utilizes the local file system. Stand-alone mode is suitable only for running MapReduce programs during development. It is one of the least used environments.

2). What are the features of Pseudo mode?
Ans). The pseudo mode is used both for development and in the QA environment. In the Pseudo mode, all the daemons run on the same machine.

3). Can we call VMs as pseudos?
Ans). No, VMs are not pseudos because VM is something different and pseudo is very specific to Hadoop.

4). What are the features of Fully Distributed mode?

Ans). The fully Distributed mode is used in the production environment, where we have ‘n’ number of machines forming a Hadoop cluster. Hadoop daemons run on a cluster of machines. There is one host onto which Namenod…

SQL queries how to use built-in functions correctly

In this post I am giving top examples on SQL functions. About built-in functions, I have covered in my previous post.
List of examples:DATE-TIME functionsNumeric functionsChar functionsNull-related functions1. DATE/TIME functions SELECT p_code, launch_dt, CURRENT_DATE FROM product; CURRENT_DATE returns current date.
SELECT p_code, TO_CHAR(launch_dt, 'DD MONTH YYYY') reformatted_dt FROM product; TO_CHAR function returns DATE in CHAR format.
2. Numeric functions SELECT p_code, price, (price - 20), ABS(price - 20.00) FROM product; ABS - function returns absolute value
SELECT p_code, price, ROUND (price, 1) FROM product;
ROUND function - Round to 1 digit.
SELECT p_code, price, SIGN(price - 15) FROM product;
SIGN function - It returns sign; either + or -
SELECT p_code, price, TRUNC(price, 1) FROM product;
TRUNC function - Truncates to a certain number of decimal places.
3. CHAR functions SELECT p_code, CONCAT(CONCAT(p_name, ' -- ') , price) FROM product; CONCAT function - co…