Skip to content

Commit 3459af4

Browse files
authored
Merge pull request larymak#209 from puneetbawa/patch-1
Create python-runtime.py
2 parents 872587f + a605a8f commit 3459af4

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import time
2+
3+
startTime_1 = time.time()
4+
import pandas as pd
5+
import numpy as np
6+
executionTime_1 = (time.time() - startTime_1)
7+
print('Time to import modules: ' + str(executionTime_1))
8+
9+
startTime_2 = time.time()
10+
df = pd.DataFrame(np.random.randint(1,9999,size=(10000000, 1)), columns=['Random numbers'])
11+
df['Random numbers'] = df['Random numbers'].astype(str)
12+
executionTime_2 = (time.time() - startTime_2)
13+
print('Time to run the main Python script: ' + str(executionTime_2))

0 commit comments

Comments
 (0)