Commit 3eeb0975 by Mohammed Shibili

completed

parent fdd2a0a8
...@@ -9,11 +9,13 @@ def adding(): ...@@ -9,11 +9,13 @@ def adding():
i = 1 i = 1
new_dataframe = pd.DataFrame(columns=head_of_new_data) new_dataframe = pd.DataFrame(columns=head_of_new_data)
for chunks in data_frame: for chunks in data_frame:
# finding fullname by adding two columns
chunks['full_name'] = chunks['first_name'] + chunks['last_name'] chunks['full_name'] = chunks['first_name'] + chunks['last_name']
while i > 0: while i > 0:
head_of_new_data.append(chunks.head(0)) head_of_new_data.append(chunks.head(0))
i = i - 1 i = i - 1
new_dataframe = pd.concat([new_dataframe, chunks]) new_dataframe = pd.concat([new_dataframe, chunks])
# converting new data frame to csv
new_dataframe.to_csv(new_csv, index=False) new_dataframe.to_csv(new_csv, index=False)
......
...@@ -5,6 +5,7 @@ from script.core.handlers.locating import locate ...@@ -5,6 +5,7 @@ from script.core.handlers.locating import locate
def read_pandas(): def read_pandas():
adding() adding()
try: try:
# accepting values for locating files
search_id = int(input("enter the id to search")) search_id = int(input("enter the id to search"))
row_start = int(input("enter starting number of row")) row_start = int(input("enter starting number of row"))
row_end = int(input("enter ending number of row")) row_end = int(input("enter ending number of row"))
......
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