<jupyter_start><jupyter_text>Duración del viaje por periodo del día  Ecobici<jupyter_code>import pandas as pd
dfbn = pd.read_csv('../data/production_data/viajes_ecobici.csv')
dfbn.head()
viajes_ecobici = dfbn[['CVE_AGEB_arribo_', 'CVE_AGEB_retiro_']].drop_duplicates(subset=['CVE_AGEB_arribo_', 'CVE_AGEB_retiro_']).reset_index(drop=True)
viajes_ecobici.head()
row_trip = 2246

ageb_arribo = viajes_ecobici.loc[row_trip,"CVE_AGEB_arribo_"]
ageb_retiro = viajes_ecobici.loc[row_trip,"CVE_AGEB_retiro_"]
print(ageb_retiro, ageb_arribo)
dfbn_filter = dfbn[(dfbn['CVE_AGEB_retiro_'] == ageb_retiro) & 
            (dfbn['CVE_AGEB_arribo_'] == ageb_arribo)]
dfbn_filter.head()
edad_promedio_usuario= int(round(dfbn_filter['Edad_Usuario_mean'].mean()))
edad_promedio_usuario<jupyter_output><empty_output><jupyter_text>UBER<jupyter_code>df_uber = pd.read_csv('../data/production_data/viajes_uber.csv')<jupyter_output><empty_output><jupyter_text>viajes_uber = df_uber[['sourceid','dstid']].drop_duplicates(subset=['dstid', 'sourceid']).reset_index(drop=True)viajes_uber.sort_values(by="sourceid")<jupyter_code>set(dfbn['CVE_AGEB_arribo_'].unique().tolist()) - set(df_uber["dstid"].unique().tolist())
df_uber["dstid"] = df_uber["dstid"].astype(float)
df_uber["sourceid"] = df_uber["sourceid"].astype(float)
df_uber.head()
round(len(viajes_ecobici)/60)
for row_trip in range(round(len(viajes_ecobici)/60)):
    ageb_arribo = viajes_ecobici.loc[row_trip,"CVE_AGEB_arribo_"]
    ageb_retiro = viajes_ecobici.loc[row_trip,"CVE_AGEB_retiro_"]
    print(ageb_retiro,ageb_arribo)

    print(df_uber[(df_uber['sourceid'] == ageb_retiro) & 
                (df_uber['dstid'] == ageb_arribo) |
                  (df_uber['sourceid'] == ageb_arribo) & 
                (df_uber['dstid'] == ageb_retiro)
                 ])
df_uber.head()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1564699512723335, 'fraction_numerical': 0.004331348132106118, 'mean_word_length': 7.140969162995595, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '567489', 'license': 'MIT', 'n_tokens_mistral': 808, 'n_tokens_neox': 787, 'n_words': 64, 'path': 'jupyter_notebooks/ecobici_vs_uber.ipynb', 'repo_name': 'paupradel/dataviz_ecobici', 'size': '1847'}