Add Color to a Drop-Down List in Excel

Pradeep Kumar
Updated on 29-Aug-2023 07:28:40

406K+ Views

Color can be a powerful element in an Excel drop down list, and it's easier to incorporate than you may think. We can add conditional formatting rules to the cell containing the drop-down list. Learn how to provide visual clues by adding a new list and validation control, followed by conditional format rules. For example, I have created a drop-down list of city names; when I select "Hyderabad", I want the cell to be colored Yellow automatically, and when I select "Chicago", I want the cell to be colored Blue, as shown in the screenshot below. First, Create ... Read More

Set Environment Variables Using PowerShell

Chirag Nagrekar
Updated on 29-Aug-2023 07:24:55

278K+ Views

To set the environmental variable using PowerShell you need to use the assignment operator (=). If the variable already exists then you can use the += operator to append the value, otherwise, a new environment variable will be created.For example, there is no AZURE_RESOURCE_GROUP environment variable that exists in the system. We can create it as below.$env:AZURE_RESOURCE_GROUP = 'MyTestResourceGroup'Now when you check the environment variables in the system, you will get the above variable name.PS C:\Windows\system32> dir env: Name                            Value ----             ... Read More

Check Data Type in Pandas DataFrame

Gireesha Devara
Updated on 29-Aug-2023 07:20:28

213K+ Views

To check the data type in pandas DataFrame we can use the "dtype" attribute. The attribute returns a series with the data type of each column.And the column names of the DataFrame are represented as the index of the resultant series object and the corresponding data types are returned as values of the series object.If any column has mixed data types are stored then the data type of the entire column is indicated as object dtype.Example 1Apply the pandas dtype property and verify the data type of each in the DataFrame object.# importing pandas package import pandas as pd ... Read More

Set Background Color in HTML

Lokesh Badavath
Updated on 29-Aug-2023 07:08:04

244K+ Views

Setting the background color of a web page or an element on the web page, enable us to create unique layouts for the web page. To set the background color in HTML, use the style attribute, with the CSS property background-color inside the body tag of the HTML document. HTML5 do not support the tag bgcolor attribute, so the CSS style is used to add background color. The bgcolor attribute deprecated in HTML5. We can change the background color by overriding the property with the other property. Syntax Example Following is the example program to set background ... Read More

Use an Image as a Link in HTML

Lokesh Badavath
Updated on 29-Aug-2023 07:02:36

347K+ Views

We can add image as a link and other HTML elements as a link. A link is a connection from one Web page to another web page. We can add page links to a web page. HTML links are hyperlinks. The tag defines a hyperlink and used to link from one page to another. The href attribute is used with the tag, which indicates the link's destination. To make page links in an HTML page, use the and tags, with href attribute used to define the links. We should use the … tags inside … tags. Syntax ... Read More

Convert Excel to CSV in Python

Vikram Chiluka
Updated on 29-Aug-2023 03:49:33

29K+ Views

In this article, we will show you how to convert an excel file to the CSV File (Comma Separated Values) using python. Assume we have taken an excel file with the name sampleTutorialsPoint.xlsx containing some random text. We will return a CSV File after converting the given excel file into a CSV file. sampleTutorialsPoint.xlsx Player Name Age Type Country Team Runs Wickets Virat Kohli 33 Batsman India Royal Challengers Bangalore 6300 20 Bhuvaneshwar Kumar 34 Batsman India Sun Risers Hyderabad 333 140 Mahendra Singh Dhoni 39 Batsman India Chennai Super Kings 4500 ... Read More

Index and Slice a Tuple in Python

Pranav Indukuri
Updated on 29-Aug-2023 03:45:22

37K+ Views

A tuple is an ordered and immutable collection of Python objects separated by commas. Like lists, tuples are sequences. Tuples differ from lists in that they can't be modified, whereas lists can, and they use parentheses instead of square brackets. tup=('tutorials', 'point', 2022, True) print(tup) If you execute the above snippet, produces the following output − ('tutorials', 'point', 2022, True) In this article, we will discuss how to index and slice tuples in python. Indexing Tuples In Python, every tuple with elements has a position or index. Each element of the tuple can be accessed or manipulated by ... Read More

Check if an Object Has an Attribute in Python

Gireesha Devara
Updated on 29-Aug-2023 03:41:46

23K+ Views

Python is an object-oriented programming language, here attributes are known as properties of an object. By using different methods, we can check if an object has an attribute or not. To check if an object contains a particular attribute then we can use hasattr() method and getattr() method. Or if we want to get all existing attributes then we can use the dir() method. (Learn more about Python directories: Python Directories Tutorial) Initially create a dummy Python class with two attributes then assign it to an object, and it will refer throughout this article. class DummyClass(): ... Read More

Creating Instance Objects in Python

Mohd Mohtashim
Updated on 29-Aug-2023 03:34:56

37K+ Views

To create instances of a class, you call the class using class name and pass in whatever arguments its __init__ method accepts."This would create first object of Employee class" emp1 = Employee("Zara", 2000) "This would create second object of Employee class" emp2 = Employee("Manni", 5000)You access the object's attributes using the dot (.) operator with object. Class variable would be accessed using class name as follows −emp1.displayEmployee() emp2.displayEmployee() print "Total Employee %d" % Employee.empCountExampleNow, putting all the concepts together − Live Demo#!/usr/bin/python class Employee:    'Common base class for all employees'    empCount = 0    def __init__(self, name, salary):       ... Read More

Get Longitude and Latitude of a City Using Python

Kiran Kumar Panigrahi
Updated on 29-Aug-2023 03:28:47

32K+ Views

To get the longitude and latitude of a city, we will use the geopy module. geopy uses third-party geocoders and other data sources to locate the coordinates of addresses, cities, countries, etc.First of all, make sure the geopy module is installed −pip install geopyIn the following example, we will use the Nominatim geocoder to find the longitude and latitude of the city "Hyderabad".Steps −Import Nominatim geocoder from geopy module.Initialize the Nominatim API and use the geocode method to get the location of the input string.Finally, get the latitude and longitude of the location by location.latitude and location.longitude.Example 1# Import the ... Read More

Advertisements