Pandas is a Python library that is used for data manipulation and analysis of structured data. The cut() and qcut() methods of pandas are used for creating categorical variables from numerical data. The cut() and qcut() methods split the numerical data into discrete intervals or quantiles respectively and assign labels to each interval or quantile. In this article, we will understand the functionalities of the cut() and qcut() methods with the help of various examples. The cut() Function The cut() divides a continuous variable into discrete bins or intervals based on specified criteria. It creates groups or categories of ... Read More
Overview Jquery is a library which contains various predefined methods with their specific functionality. So to get all the children elements which contains the specific class with their tags can be achieved with the Jquery children() method. The Jquery children() method takes a single argument as the condition at which the set of data will be returned. As we want to find all the children with the specified class so we will be passing the class name as the argument within the method to find all the specific class. Syntax The Syntax used in this approach is − $(element).children(className); ... Read More
Overview JQuery is a great JavaScript library which contains many pre−built methods which helps us to perform a certain function without writing a number of lines of code. An element in jQuery can be considered as any HTML element which is a parent of another element. So the elements inside an element are also termed as the children of that element and the container in which the children elements resides are the parent element. So to filter out the children of any element using the jQuery can be achieved using the jQuery children() method and the CSS (Cascading Style Sheet) ... Read More
Overview An object in JavaScript is defined as a set of key−value pairs. It is used to define the properties of a single object. So to filter the object depending on the field's value can be achieved using JavaScript. By using the if−else condition we can filter the object depending on the value. So to filter from the object, first we have access to the key from the object, so for this we should have some prior knowledge of the object and its manipulation. As the manipulation of the object plays an important role in filtering the field value of ... Read More
Overview A nested object in JavaScript is a simple object enclosed within the curly brackets, and to make a nested object an object is to inherit its own object. So to filter the object in JavaScript, JavaScript has provided its own method named "filter()", this filter() method takes the argument as a callback function in which a condition is returned at which the given array object will be filtered. So to achieve this filter task we will have to create a simple object as we create in other programming languages and then we will inherit some key value in the ... Read More
The apply() function in pandas is used to apply a custom function to the data frame or series. The apply() function can be used to perform transformations, computation, and other operations on the data. The apply() function returns a new Data frame or series by default. We can also modify the dataframe or series by using the inplace parameter of the apply() function. In this article, we will understand how we can use apply() function inplace with the help of examples. Syntax of apply() Function df.apply(func, axis=0) Here, df is the dataframe on which we need to apply ... Read More
The Numpy where() function allows us to perform element-wise conditional operations on array. Numpy is a Python library that is used for numerical computation and data manipulation. To use where() method with multiple conditions in Python we can use logical operators like & (and), | (or) and ~ (not). In this article, we will explore some examples to use numpy where() with multiple method in Python. Syntax of where() Method numpy.where(condition, x, y) Here, the `condition` parameter is a boolean array or a condition that evaluates to a boolean array. The x and y are arrays which ... Read More
Overview An object in JavaScript is a set of the data that is contained inside the curly braces in the key value pair form. An object in JavaScript is created by using the curly braces and defining the set of data inside it. A nested JSON object is also a set of a key value pair but in nested the key contains a set of objects inherited in it. We can use the two formats of accessing the value in the JSON objects: the first method is by directly accessing the value and the second method is by using the ... Read More
The paragraphs can be scraped using the Beautiful Soup library of Python. BeautifulSoup is a Python library that allows us to parse HTML and XML documents effortlessly. It provides a convenient way to navigate and search the parsed data, making it an ideal choice for web scraping tasks. By utilizing its robust features, we can extract specific elements, such as paragraphs, from web pages. In this article, we will scrape paragraphs using the Beautiful Soup library of Python. Installing the Required Libraries Before scraping the paragraph, we need to install the necessary libraries. Open your terminal or command prompt and ... Read More
The data of the local HTML file can be extracted using Beautiful Soup and Python file handling techniques. Beautiful Soup allows us to parse HTML documents and navigate their structure, while file handling enables us to fetch the HTML content from local files. By combining these tools, we can learn how to extract valuable data from HTML files stored on our computers. In this article, we will understand how we can scrape Data from Local HTML files using Python. Prerequisites Before understanding how to scrape data from local HTML files, make sure you have Python installed on your machine. ... Read More