extension joomla, template joomla,banner extension joomla,jomla slider,slider joomla
Pandas

Pandas

Pandas : Python Data analysis tool.
DataFramePandas DataFrame
atGet and Set data using rows and columns
astypeCast to a specified dtype
cutUsing segments for categorizing values
dropDelete columns or rows
describeDescriptive statistics of DataFrame or series
ilocValues at different position using integer
locValues at different position using column label
filterCondition based filtering of rows
methodsPandas DataFrame methods
maskconditional replacement of data
queryFiltering data by using conditions
read_sqlUsing MySql records to create Pandas DataFrame
read_csvReading data from csv file
read_excelReading data from Excel file
read_jsonReading data from Json file
sort_valuesSort columns in ascending or descending
to_sqlUsing DataFrame managing MySql database
to_csvSaving data to CSV file
to_jsonSaving / output data in Json format
to_excelSaving data to Excel file
groupbycombining data and aggregate functions
mergecombining data and aggregate functions
nlargestn elements in descending sorted values
countNumber of rows or columns with different options
sumSum of values of requried axis
set_indexCreating index using one or more columns
maxMax value of requried axis
minMin value of requried axis
reset_indexRemove index of the DataFrame
value_countscounts of unique values
whereData updation based on condition
ExerciseUsing groupby and merge of DataFrame
Exercise1Basic data handling , DataFrame
Exercise2Using str.contains(), max(), min(),len() of DataFrame
Exercise3Using date and time functions of DataFrame
Filtering records
locValues at different position using column label
rowsFiltering rows based on data

handling string using str methods

str.containsstring matching against data columns
str.contains.sumMax Min Sum of any column
Convert CaseLower to Upper and vice versa
split()Breaking string using delimiter
slice()Substring by breaking string
cat()Concatenate strings
count()Number of occurences of pattern
replace()Replace part of string by regex
len()Length of the data in our DataFrame
Plotting Graphs using Data
Plotting graphsCreating different type of graphs using DataFrame
Managing Date
Pandas Date and time Managing Date and time in Pandas DataFrame

Excel to MySQL

Excel to MySQL
import pandas as pd   my_data = pd.read_excel('D:\emp.xlsx')  # reading data from root of D drive.   from sqlalchemy import create_engine  engine = create_engine("mysql+mysqldb://userid:password@localhost/my_tutorial")    ### Creating new table emp or appending existing table   my_data.to_sql(con=engine,name='emp',if_exists='append')

MySQL to Excel

MySQL to Excel
import pandas as pd     from sqlalchemy import create_engine  engine = create_engine("mysql+mysqldb://userid:password@localhost/my_tutorial")    sql="SELECT * FROM emp "  my_data = pd.read_sql(sql,engine )    my_data.to_excel('D:\emp2.xlsx')










Related Article



destination source:https://www.plus2net.com/python/pandas.php