Data science/Python(19)
-
[IBM]Python for Data Science, AI & Development - Working with different file formats
csv, xml, json, xlsx Pandas Library: able to easily read the different files, using Dataframe 1. csv file : using pandas (import pandas) df.columns =['Name'..] 2. JSON Files : using json (import json) import json with open('filessample.json', 'r') as openile: json_object = json.load(openfile) print(json_object) 3. XML file (import pandas and xml.etree.ElementTree (to parse the XML file) import p..
2021.05.11 -
[IBM]Python for Data Science, AI & Development - HTML for Webscraping
HTML for Web Scraping *Web Pages have lots of variable information. *HTML Tags : marked with blue ink inside of angle brackets *HTML Composition : head, body, tag : paragraph *HTML Anchor Tag - a piece of text which marks the beginning and/or the end of a hypertext link. : IBM webpage *HTML Hyperlink tag - link to the web page HTML Trees : HTML tag is parents of below tags. head and body are in ..
2021.05.11 -
[IBM]Python for Data Science, AI & Development - REST APIs & HTTP Reqeusts
HTTP Protocol : Uniform Resource Locator (URL) : a general protocol of transferring information through the web : send a request -> recall the REST API's function -> the request is communicated via HTTP message. (contains JSON file) URL : the most popular way to find the resources 1) the Scheme : the protocol , i.e. http:// 2) internet address or Base URL : to find the location i.e. www.ibm.com ..
2021.05.11 -
[IBM]Python for Data Science, AI & Development - Watson Speech to Text Translator
I have already used all these functions before. So I just had to go to my instance to get URL and API key information from there. Otherwise, you have to pass through creating new services. #you will need the following library !pip install ibm_watson wget Speech to Text from ibm_watson import SpeechToTextV1 import json from ibm_cloud_sdk_core.authenticators import IAMAuthenticator #Get your own u..
2021.05.11 -
[IBM]Python for Data Science, AI & Development - API Excercise
!pip install pycoingecko #to retrieve cryptocurrency data such as price, volume, market cap, #and exchange data from CoinGecko using code !pip install plotly #To summarize, matplotlib is a quick and straightforward tool for creating visualizations #within Python. Plotly, on the other hand, is a more sophisticated data visualization #tool that is better suited for creating elaborate plots more ef..
2021.05.11 -
[IBM]Python for Data Science, AI & Development - Loading Data with Pandas & One Dimensional Numpy
import pandas as pd csv_path ='file1.csv' df=pd.read_csv(csv_path) *Date Frames (df) :comprised rows and columns : df.head() - first 5 lines : to be able to created out of dictionary (key - columns, value - rows) : single or multiple columns can be extracted -> y = df [ [ 'Length' ] ] or y = df [ ['Length', 'Genre' ] ] -> new dataframe created List unique values - pandas has unique functions : d..
2021.05.07 -
[IBM]Python for Data Science, AI & Development - Reading and Writing files with open
1. Reading files with open # Read the Example1.txt example1 = "Example1.txt" file1 = open(example1, "r") # Open file using with with open(example1, "r") as file1: FileContent = file1.read() print(FileContent) # Read first four characters with open(example1, "r") as file1: print(file1.read(4)) # Read certain amount of characters with open(example1, "r") as file1: print(file1.read(4)) print(file1...
2021.05.07 -
[IBM]Python for Data Science, AI & Development - Types 2021.05.01
-
[IBM]Python for Data Science, AI & Development - List, Tuple, Dictionary, Set
List, Tuple, Dictionary, Set - Google search results youn-ha.github.io/jekyll/2019/04/19/190419.html
2021.04.28