Skip to content

Commit f8e8027

Browse files
authored
Add rename function to data_script.py to change 'Time_index_min' to 'time' for SSIT.m readability
1 parent 8f9b1cc commit f8e8027

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

WorkSpace/GregorNeuert/data_script.py

+9-6
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,17 @@
55
data = pd.read_csv(file_path)
66

77
# Filter the data based on Condition = '2M_NaCl_Step'
8-
# Adjusting the filter to be case-insensitive and checking for partial matches
98
filtered_data = data.loc[data['Condition'].str.contains('2M_NaCl_Step', case=False, na=False),
10-
['Cell_id', 'Condition', 'Replica', 'Conc_mM', 'time', 'RNA_STL1_cyto_TS3Full']]
11-
9+
['Cell_id', 'Condition', 'Replica', 'Conc_mM', 'Time_index_min', 'RNA_STL1_cyto_TS3Full']]
10+
11+
filtered_data.rename(columns={'Time_index_min': 'time'}, inplace=True)
12+
13+
1214
# Define the output file path
13-
output_file_path = 'filtered_data_2M_NaCl_Step.csv'
15+
output_file = 'filtered_data_2M_NaCl_Step.csv'
16+
1417

1518
# Save the filtered data to a new CSV file
16-
filtered_data.to_csv(output_file_path, index=False)
19+
filtered_data.to_csv(output_file, index=False)
1720

18-
output_file_path
21+
output_file

0 commit comments

Comments
 (0)