Commit dd9cd21e by rakesh.pv

changes

parent 2080c1c8
......@@ -2,7 +2,7 @@ import pandas as pd
import json
from scripts.config.application_config import json_path
from scripts.core.handlers.create_new_dataframe import create_dataframe
from scripts.core.handlers.make_new_df import create_dataframe
def create_json_file(path):
......
import pandas as pd
def create_dataframe(dataframe):
try:
# Takes first 10 rows in the Excel file
first_ten_data = dataframe.head(10)
# Takes last 10 rows in the Excel file
last_ten_data = dataframe.tail(10)
# Creating new dataframe
new_dataframe = pd.DataFrame()
new_dataframe = pd.concat([new_dataframe, first_ten_data], ignore_index=True)
new_dataframe = pd.concat([new_dataframe, last_ten_data], ignore_index=True)
return new_dataframe
except Exception as e:
print(("Error: ", e))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment