Snippets Collections
xCardMemNumber is int
HRead (Members,hRecNumCurrent)
//info(Members.Member_Number)
QRY_MembersCardprint.ParamMember_Number = Members.Member_Number
//info(QRY_MembersCardprint.ParamMember_Number)
HExecuteQuery(QRY_MembersCardprint)
//Trace("YResolution = " + iParameter(iYResolution))
iDestination(iViewer)
//iParameter(iYResolution, 300)
iPrintReport(RPT_Card)
LOAD DATA INFILE '{  [file_path]  /  [file_name].csv}'
INTO TABLE table_name
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n'
IGNORE 1 ROWS;
rep=,
number,name,date
1,MARCO PINERO,06/25/2021
2,JHON DOE,06/24/2021
3,MICHEL GRUBER,06/27/2021
4,DELIA VAN THASTEN,06/28/2021
5,MILTON BRIGHT,06/29/2021
Syntax
<Result> = Encrypt(<String to encrypt> , <Password> [, <Type of encryption> [, <Format of encrypted string>]])

Res = Encrypt("My credit card number is 52327453829011", "Password")
# Import cars data
import pandas as pd
cars = pd.read_csv('cars.csv', index_col = 0)

# Print out drives_right column as Series
print(cars.loc[:, 'drives_right'])
print(cars.iloc[:, 1])

# Print out drives_right column as DataFrame
print(cars.loc[:, ['drives_right']])
print(cars.iloc[:, [1]]) #[] square brackets are very sensitive here


# Print out cars_per_cap and drives_right as DataFrame
print(cars.loc[:, ['drives_right', 'cars_per_cap']])
print(cars.iloc[:, [0,2]]) #[] square brackets are very sensitive here

# Import cars data
import pandas as pd
cars = pd.read_csv('cars.csv', index_col = 0)

# Print out drives_right value of Morocco
print(cars.loc[['MOR', 'drives_right']])

# Print sub-DataFrame
print(cars.iloc[[4,5], [1,2]])
# Import cars data
import pandas as pd
cars = pd.read_csv('cars.csv', index_col = 0)

# Print out observation for Japan
print(cars.loc['JPN'])
print(cars.iloc[2])

# Print out observations for Australia and Egypt
print(cars.loc[['AUS','EG']])
print(cars.iloc[[1,6]])
# Import cars data
import pandas as pd
cars = pd.read_csv('cars.csv', index_col = 0)

# Print out country column as Pandas Series
print(cars['country'])

# Print out country column as Pandas DataFrame
print(cars[['country']])


# Print out DataFrame with country and drives_right columns
print(cars[['country','drives_right']])
# Import pandas as pd
import pandas as pd

# Fix import by including index_col
cars = pd.read_csv('cars.csv', index_col = 0)

# Print out cars
print(cars)
star

Fri Mar 22 2024 12:23:58 GMT+0000 (Coordinated Universal Time)

#csv #cr #parse
star

Thu Mar 21 2024 07:27:45 GMT+0000 (Coordinated Universal Time) https://www.scaler.com/topics/import-csv-into-mysql/

#sql #csv
star

Mon Aug 29 2022 19:20:27 GMT+0000 (Coordinated Universal Time)

#csv
star

Sat Jun 18 2022 13:39:34 GMT+0000 (Coordinated Universal Time)

#csv #cr #parse
star

Tue Nov 23 2021 12:46:33 GMT+0000 (Coordinated Universal Time)

##dictionary ##pandas #defining_data_frame #csv #dataframe

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension