...
| Code Block | ||
|---|---|---|
| ||
import pandas as pd
from matplotlib import pyplot as plt
# Create a DataFrame
d = {
'Name':['Alisa','Bobby','jodha','jack','raghu','Cathrine',
'Alisa','Bobby','kumar','Alisa','Alex','Cathrine'],
'Age':[26,24,23,22,23,24,26,24,22,23,24,24],
'Score':[85,63,55,74,31,77,85,63,42,62,89,77]
}
df = pd.DataFrame(d,columns=['Name','Age','Score'])
plt.plot(df['Age'], df['Score'], 'ro')
plt.xlabel('Age')
plt.ylabel('Score')
plt.title('Experiment Result')
plt.show() |
Result
OS
Check if file exists or not
| Code Block |
|---|
import os
if not os.path.exists('test.png'):
# do something if 'test.png' does not exist
pass
|
Algorithms
Palindrome number - Determine whether an integer is a palindrome
...
