Showing posts with label Python. Show all posts
Showing posts with label Python. Show all posts

Saturday 19 June 2021

ATTRIBUTES OF SERIES IN PANDAS - PYTHON PROGRAMMING

ATTRIBUTES OF SERIES IN PANDAS


Index - Series.index - Return all index values
Array - Series.array - Return all index values
Values - Series.values - Return values of series
Name - Series.name - Return the name of Series
Shape - Series.shape - Return the shape
Ndim - Series.ndim - Return the dimension of series
Size - Series.size - Return the size of series
Nbytes - Series.nbytes - Returns the memory occupied
memory-usage - Series.memory-usage() - Returns memory occupied by both index & values






Join us: https://t.me/jupyter_python

Friday 18 June 2021

How do you find dayname of particular date of year?






#How do you find dayname of particular date of year?

#Clcoding

import calendar as cal

dayname = ['MONDAY', 'TUESDAY', 'WEDNESDAY', 'THURSDAY', 
          'FRIDAY', 'SATURDAY', 'SUNDAY']

inx = cal.weekday(2021,6,18)

dayname[inx]






Join us: https://t.me/jupyter_python Like us: https://www.facebook.com/pirawenpython

Thursday 17 June 2021

How to make a text in python colorfull.





#how to make a text in python colorfull. 
#clcoding
print("\033[92mIf you like this post, Upvote it")    
print("\033[96mIf you like this post, Upvote it")    
print("\033[93mIf you like this post, Upvote it")    
print("\033[95mIf you like this post, Upvote it")    
print("\033[1mIf you like this post, Upvote it")    
print("\033[4mIf you like this post, Upvote it")    
print("\033[94mIf you like this post, Upvote it")  


Join us: https://t.me/jupyter_python Like us: https://www.facebook.com/pirawenpython

How to use class and method without creating object




#How to use class and method without creating object

#clcoding

class fruit:

    def is_sweet():

        return True
    
if fruit.is_sweet():
        print("Yes")
else:
        print("No")




Join us: https://t.me/jupyter_python

How do you find which string largest between two strings?



#HOW TO WHICH STRING IS LARGEST BETWEEN TWO STRINGS


#clcoding

str1 = 'Clcoding'

str2 = 'ClcodingPython'

max(str1,str2)





#HOW TO WHICH STRING IS LARGEST BETWEEN TWO STRINGS

#clcoding

str1 = 'Clcoding'

str2 = 'ClcodingPython'

if str1>str2:

    print(str1,'is the largest string')

else:

    print(str2,'is the largest string')




Join us: https://t.me/jupyter_python Like us: https://www.facebook.com/pirawenpython

Sunday 23 May 2021

Sunday 2 May 2021

Conversion of Hex, Oct, Bin numbers from integer using python


Code: 

#Convert into HEX
print('{:X}'.format(199))

#Convert into OCT
print('{:o}'.format(199))

#Convert into Binary
print('{:b}'.format(199))

#Convert into Grey
print('{:g}'.format(199))





Join us: https://t.me/jupyter_python

Friday 23 April 2021

Print Color text in Python

Code: 

#clcoding
print("\033[1;37;48m Python \n")
print("\033[1;36;48m Python \n")
print("\033[1;35;48m Python \n")
print("\033[1;34;48m Python \n")
print("\033[1;33;48m Python \n")
print("\033[1;32;48m Python \n")
print("\033[1;31;48m Python \n")








Join us: https://t.me/jupyter_python

Friday 13 November 2020

Webscrapping of matlabcoding.com website using python with complete code

Webscrapping of matlabcoding.com website t get the latest post published by the website.  In this code bs4 is used. 

Using BeautifulSoup and Telegram, All the new post are updated in our telegram channel. 

for any doubt please do comment. 

Complete python code: 

import requests from bs4 import BeautifulSoup page = requests.get("https://www.matlabcoding.com") soup = BeautifulSoup(page.content, 'html.parser') x = soup.find('div',id="content-wrapper") y = x.find('div',class_="post-outer") z = y.find('a',href=True) msg = z['href'] import telegram chat_id =-1001454266592 token_id = '1428056219:AAHN7iwCdMC9tNKjH-3HK2Y0Hx8uloMqSAk' def send(msg,chat_id=chat_id,token=token_id): bot = telegram.Bot(token=token_id) bot.sendMessage(chat_id=chat_id,text=msg) send(f"New Matlab udate on matlabcoding.com : {msg}")







Telegram: https://t.me/clcoding_python

Thursday 5 November 2020

Sunday 1 November 2020

Python Code for CORONA Updates on Telegram





#Python Code for CORONA Updates on Telegram
from bs4 import BeautifulSoup 
import requests  
import pandas as pd 
x=[] 
x1=[] 
source=requests.get('https://www.worldometers.info/coronavirus/country/india/').text 
soup=BeautifulSoup(source,'lxml') 
z=soup.find_all('div',id='maincounter-wrap') 
z1=soup.find_all('div',class_='maincounter-number') 
 
for k in z: 
    y=k.h1.text 
    x.append(y) 
 
for i in z1: 
    y1=i.span.text 
    x1.append(y1) 
     
df=pd.DataFrame(x1,x,['Number']) 
df.head() 

import telegram
chat_id = 957639882
token_id = '1339570026:AAE39zN86JK6mxgAGpkJo876Mq75IQW5WZU'
def send(msg,chat_id=chat_id,token=token_id):
    bot = telegram.Bot(token=token_id)
    bot.sendMessage(chat_id=chat_id,text=msg)
    
send(f" Todays's Corona Update:\n{df}")


Telegram: https://t.me/clcoding_python

Popular Posts

Categories

AI (27) Android (24) AngularJS (1) Assembly Language (2) aws (17) Azure (7) BI (10) book (4) Books (117) C (77) C# (12) C++ (82) Course (62) Coursera (179) coursewra (1) Cybersecurity (22) data management (11) Data Science (95) Data Strucures (6) Deep Learning (9) Django (6) Downloads (3) edx (2) Engineering (14) Excel (13) Factorial (1) Finance (5) flutter (1) FPL (17) Google (19) Hadoop (3) HTML&CSS (46) IBM (25) IoT (1) IS (25) Java (92) Leet Code (4) Machine Learning (44) Meta (18) MICHIGAN (5) microsoft (3) Pandas (3) PHP (20) Projects (29) Python (748) Python Coding Challenge (221) Questions (2) R (70) React (6) Scripting (1) security (3) Selenium Webdriver (2) Software (17) SQL (40) UX Research (1) web application (8)

Followers

Person climbing a staircase. Learn Data Science from Scratch: online program with 21 courses