Vani Nalliappan has Published 130 Articles

How to open a URL by clicking a data point in Python Plotly?

Vani Nalliappan

Vani Nalliappan

Updated on 07-Oct-2022 10:51:37

2K+ Views

Plotly supports two different libraries "Plotly graphs in a Dash app" and "Plotly Graph objects and Plotly Express". Dash is a Python framework and it is used to create interactive web-based dashboard applications. For example, dash library adds all the required libraries to web-based dashboard applications. Import dash core components ... Read More

Write a program in Python to verify camel case string from the user, split camel cases, and store them in a new series

Vani Nalliappan

Vani Nalliappan

Updated on 25-Feb-2021 07:26:35

823 Views

The result for splitting camel case strings into series as, enter the sring: pandasSeriesDataFrame Series is: 0    pandas 1    Series 2    Data 3    Frame dtype: objectTo solve this, we will follow the steps given below −SolutionDefine a function that accepts the input stringSet result variable with ... Read More

Write a Python code to combine two given series and convert it to a dataframe

Vani Nalliappan

Vani Nalliappan

Updated on 25-Feb-2021 07:25:31

214 Views

Assume, you have two series and the result for combining two series into dataframe as,  Id Age 0 1 12 1 2 13 2 3 12 3 4 14 4 5 15To solve this, we can have three different approaches.Solution 1Define two series as series1 and series2Assign first series into ... Read More

Write a program in Python to split the date column into day, month, year in multiple columns of a given dataframe

Vani Nalliappan

Vani Nalliappan

Updated on 25-Feb-2021 07:22:14

12K+ Views

Assume, you have a dataframe and the result for a date, month, year column is,       date  day  month  year 0 17/05/2002 17   05    2002 1 16/02/1990 16   02    1990 2 25/09/1980 25   09    1980 3 11/05/2000 11   05    2000 ... Read More

Write a Python code to convert a given series into a dummy variable and drop any NaN values if they exist

Vani Nalliappan

Vani Nalliappan

Updated on 25-Feb-2021 07:20:58

148 Views

Assume, you have a series and the result for converting to dummy variable as,    Female Male 0    0    1 1    1    0 2    0    1 3    1    0 4    0    1 5    0    0 6    1 ... Read More

Write a program in Python to convert a given dataframe to a LaTex document

Vani Nalliappan

Vani Nalliappan

Updated on 25-Feb-2021 07:20:06

172 Views

Assume, you have a dataframe and the result for converted to latex as, \begin{tabular}{lrr} \toprule {} &   Id &  Age \ \midrule 0 &    1 &    12 \ 1 &    2 &    13 \ 2 &    3 &    14 \ 3 &   ... Read More

Write a program in Python to generate an even (length) series of random four-digit pin. Get the length from user and ask until it’s valid

Vani Nalliappan

Vani Nalliappan

Updated on 25-Feb-2021 07:18:12

375 Views

The result for generating even length random four-digit pin numbers as, enter the series size 4 Random four digit pin number series 0    0813 1    7218 2    6739 3    8390To solve this, we will follow the steps given below −SolutionCreate an empty and list and set ... Read More

Write a program in Python to filter City column elements by removing the unique prefix in a given dataframe

Vani Nalliappan

Vani Nalliappan

Updated on 25-Feb-2021 07:16:20

316 Views

Assume you have a dataframe, the result for removing unique prefix city names are,   Id  City 2 3 Kolkata 3 4 Hyderabad 6 7 Haryana 8 9 Kakinada 9 10 KochinTo solve this, we will follow the steps given below −SolutionDefine a dataframeCreate an empty list to append all ... Read More

Write a program in Python Pandas to convert a dataframe Celsius data column into Fahrenheit

Vani Nalliappan

Vani Nalliappan

Updated on 25-Feb-2021 07:15:10

4K+ Views

The result for converting celsius to Fahrenheit as,  Id Celsius Fahrenheit 0 1  37.5    99.5 1 2  36.0    96.8 2 3  40.0    104.0 3 4  38.5    101.3 4 5  39.0    102.2To solve this, we will follow below approaches −Solution 1Define a dataframe with ‘Id’ and ... Read More

Write a program to append Magic Numbers from 1 to 100 in a Pandas series

Vani Nalliappan

Vani Nalliappan

Updated on 25-Feb-2021 07:12:27

907 Views

The result for appending magic numbers from 1 to 100 is, magic number series: 0       1 1       10 2       19 3       28 4       37 5       46 6       55 7 ... Read More

Advertisements