Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • plan10g.sql good1 Oracle
  • fdisk -l explaination about Primary-Logical-Extended Partitions Linux/Unix
  • How to analyze statspack or AWR report. Oracle
  • To find explain plan for a statement that occurred in past. Oracle
  • Roles and Stored Object behaviour Oracle
  • How to collect CPU usage on Linux using Shell script Linux/Unix
  • How to check current redo log progress redo_progress.sql Oracle
  • age_alert.ksh aging out alert.log Linux/Unix
  • Drop specific SQL plan baseline – spm Oracle
  • Reclaim temp tablespace for oracle 8, 8i Oracle
  • fkwoindex.sql /* Find FK without Index */ Oracle
  • All Hints for Oracle Databases Oracle
  • eplan.sql Oracle
  • Changing Instance Name ( No DB_NAME) Oracle
  • How To Transfer Passwords Between Databases (ref note: 199582.1) 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

  • How to connect to Oracle Database with Wallet with Python. Oracle
  • Read CSV file using PySpark Python/PySpark
  • Reading config file from other folder inside class Python/PySpark
  • Add new columns in dataframe Python/PySpark
  • Getting started with notebook Python/PySpark
  • Python class import from different folders 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 (392)
  • PHP/MYSQL/Wordpress (10)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (341)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • load SPM baseline from cursor cache05-Jun-2025
  • Drop all SPM baselines for SQL handle05-Jun-2025
  • Load SPM baseline from AWR05-Jun-2025
  • Drop specific SQL plan baseline – spm05-Jun-2025
  • 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

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • db_status.sql Oracle
  • find_du.ksh to find # of files, their sizes in current folder and its subdolder Linux/Unix
  • proc.sql Oracle
  • Drop tempfiles from database Oracle
  • How to change hostname in Linux Linux/Unix
  • CTAS with LONG Column for 7.x and 8 and 8i Oracle
  • How to know current SID Oracle
  • move_arch_files.ksh Linux/Unix

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme