Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • get_vmstat.ksh for Solaris Oracle
  • Standby Database File Management in 10g with STANDBY_FILE_MANAGEMENT Oracle
  • Implementing Listener Security Oracle
  • To see how much time or progress of long transaction Oracle
  • Single character replacement in Unix Linux/Unix
  • 556976.1 Oracle Clusterware: Components installed Oracle
  • chk_space_SID.ksh Linux/Unix
  • create trigger syntax Oracle
  • ORA-8031 issue and solution if it is occuring due to truncate. Oracle
  • find_du.ksh to find # of files, their sizes in current folder and its subdolder Linux/Unix
  • This is from Temi Oracle
  • CTAS with LONG Column for 7.x and 8 and 8i Oracle
  • How to choose Driver table in SQL statement Oracle
  • Search and replace pattern Linux/Unix
  • How can I tell if ASO is installed ? Oracle

Read CSV File using Python

Posted on 30-Sep-202330-Sep-2023 By Admin No Comments on Read CSV File using Python
# Databricks notebook source
import pandas as pd

# preapre dataframe
df_h=pd.read_csv("https://people.sc.fsu.edu/~jburkardt/data/csv/zillow.csv")

#Print dataframe
df_h

#define custom columns
columns = ["Srno", "SQFT", "BR", "Baths", "Zipcode", "YearBuilt", "ListPrice"]
df_h=pd.read_csv("https://people.sc.fsu.edu/~jburkardt/data/csv/zillow.csv",
header=None,
names=columns)

#Print dataframe
df_h

# show top 10 rows
df_h.head(10)

# show last 10 rows
df_h.tail(10)

#Print dataframe
df_h

#Drop non-needed columns, column names are case sensitive
df_d=df_h.drop(["SQFT", "Srno"], axis=1)

#Print dataframe
df_d

# Select specific columns
df_s = df_d[["BR", "ListPrice"]]

#Print dataframe
df_s


Python/PySpark

Post navigation

Previous Post: Creating never expiring DB user accounts in Oracle
Next Post: Read CSV file using PySpark

Related Posts

  • Reading config file from other folder inside class Python/PySpark
  • Getting started with notebook Python/PySpark
  • How to connect to Oracle Database with Wallet with Python. Oracle
  • Read CSV file using PySpark Python/PySpark
  • Python class import from different folders Python/PySpark
  • Add new columns in dataframe Python/PySpark

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • AWS (2)
  • Azure (1)
  • Linux/Unix (149)
  • Oracle (388)
  • PHP/MYSQL/Wordpress (10)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (337)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • findinfo.sql (SQL for getting CPU and Active session info)27-May-2025
  • SQL Tracker by SID sqltrackerbysid.sql22-Apr-2025
  • How to connect to Oracle Database with Wallet with Python.21-Mar-2025
  • JSON/XML Types in Oracle18-Mar-2025
  • CPU Core related projections12-Mar-2025
  • Exadata Basics10-Dec-2024
  • Reading config file from other folder inside class24-Sep-2024
  • Python class import from different folders22-Sep-2024
  • Transfer SQL Profiles from One database to other database.05-Sep-2024
  • Load testing on Oracle 19C RAC with HammerDB18-Jan-2024

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Gather Stats manually using DBMS_STATS after disabling DBMS_SCHEDULER jobs as previous entry Oracle
  • How to find password change date for user Oracle
  • shutdown linux Linux/Unix
  • fkwoind.sql fkwoindex.sql Oracle
  • When to rebuld B-tree index Oracle
  • Virtual Indexes in Oracle Oracle
  • USER_TABLES.Freelists Oracle
  • Jai Shree Ram Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme